Working with Sub-Collections in Firebase Firestore for iOS Apps | Firebase Bootcamp #15

Поделиться
HTML-код
  • Опубликовано: 5 ноя 2024

Комментарии • 24

  • @richardhasson265
    @richardhasson265 Год назад +2

    Really appreciating that you're showing ways to code that are so scalable. Really forces you to pay attention to how much you're hitting the server, etc.

  • @mg_chai
    @mg_chai Год назад +1

    You are always my motivation to writing my own app. Very much appreciate your efforts!

  • @AppleDeveloperIQ
    @AppleDeveloperIQ 7 месяцев назад

    I have some experience in Swiftui and I recently made an application for watching movies and linked the project with Firebase, but when I wanted to create a section for series, I found it difficult because I know how to add a single video. How about you explain such a topic and design an application for series?

  • @shashank515
    @shashank515 Год назад

    Hey,
    It is an Amazing Video. I was following the bootcamp and thought of a use case where I want to show the star on the product on the home screen,
    If I have added that product to my Favorite list.
    The solution I could think of is:
    1. Create a list in each product with the user ids who have made that product a favorite and then fetch the list with the product and check if the current userId is included or not.
    2. Fetch all the favorites in advance and match each product does that include in the user's favorite list.
    3. For each product on appear on the screen, Query in the user's favorite list in the user's collection to check if the product id exists in that list.
    Any Thoughts?
    Thanks

  • @JC-nl5ub
    @JC-nl5ub Год назад +1

    your videos are great.

  • @911gogogo
    @911gogogo Год назад

    Thank you so much your hard work!

  • @sraldous
    @sraldous Год назад

    Can you please show how to send notifications to all users who have a particular item in their list? e.g. if a price changes for a favorite item send them a notification?

  • @andresraigoza2082
    @andresraigoza2082 Год назад

    Awesome! thank you so much. I've been noticing that sometimes you just use "try" without a do catch block and even without optional "try?" inside a Task and the compiler doesn't complain. Is it because catching errors inside a Task is optional?

    • @milanlabus1582
      @milanlabus1582 13 дней назад

      why mark try with ? you make the fact that it throws an error optional, so your code will continue without giving you an error

  • @josejaimefelixgarciagarcia8884
    @josejaimefelixgarciagarcia8884 2 месяца назад

    UI Question, In 37:12, what makes the images show the loading spinner?

  • @tgold94
    @tgold94 Год назад

    Hey man loving the series so far, was wondering your thoughts on @FirestoreQuery property wrapper? Will there be any future videos on it?

    • @SwiftfulThinking
      @SwiftfulThinking  Год назад +1

      I’ve actually never heard of this until googling it right now 😅 I don’t have any videos on it but I’ll include it in a survey at the end to see if there is interest in it.
      I’ll note that it looks like it would tightly couple Firebase as a dependency to the View, which I would not do in my own apps. The approach I’ve taken in these videos could easily be erased to a protocol for mocking/testing/etc.

    • @tgold94
      @tgold94 Год назад

      @@SwiftfulThinking That's a really good point, so if you were making a production app you'd stick with your current approach in these videos instead of using the property wrapper?

    • @SwiftfulThinking
      @SwiftfulThinking  Год назад +1

      @@tgold94 haha yea, thats why I’m teaching it 🤙 This is exactly what I do in production, except I’ll have a few extra protocols to decouple the dependency completely and inject the manager rather than use a Singleton.

  • @khaled.m24
    @khaled.m24 Год назад

    It's a great video ❤

  • @Designguidetv
    @Designguidetv Год назад

    ok this was a little hard for me, I might have to watch it again sometime..

  • @NickGo
    @NickGo Год назад +1

    I think getDocuments as is not working anymore or I'm missing async await somewhere

    • @J10N
      @J10N Год назад

      I was having a similar issue… couldn’t find a solution anywhere but after a couple hours came up with this. (My variables/functions are named for my specific project but replace Book with UserFavoriteProduct)
      func getBooks(orgId: String) async throws -> [Book] {
      var arr: [Book] = []
      do{
      let temp = try await orgBooksDBCollection(orgId: orgId).getDocuments()
      try temp.documents.forEach { x in
      arr.append( try x.data(as: Book.self))
      }
      } catch{
      print(error)
      }
      return arr
      }

    • @J10N
      @J10N Год назад

      Just a warning I have no idea what I’m doing so this is probably not the right way to do it but it worked lol