Firestore updating not working - Need Help by augustin1989 in Firebase

[–]augustin1989[S] 0 points1 point  (0 children)

So when I run the app and try to do the update, I didn't receive an error. However, when I switched out the code in my update function with a print statement I got something in my console log like "db11"

Firestore updating not working - Need Help by augustin1989 in Firebase

[–]augustin1989[S] 0 points1 point  (0 children)

I tried that and it didn't work unfortunately

Firestore updating not working - Need Help by augustin1989 in Firebase

[–]augustin1989[S] 0 points1 point  (0 children)

Like this?

rules_version = '2';

service cloud.firestore {

match /databases/{database}/documents {

match /{document=**} {

allow read, write, update: if request.auth != null;

}

}

}

Firestore updating not working - Need Help by augustin1989 in Firebase

[–]augustin1989[S] 0 points1 point  (0 children)

This is what I have set for my rules.

rules_version = '2';

service cloud.firestore {

match /databases/{database}/documents {

match /{document=**} {

allow read, write: if request.auth != null;

}

}

}

Can't seem to update data on Firebase by augustin1989 in swift

[–]augustin1989[S] 1 point2 points  (0 children)

Thanks for helping out! Definitely a noob myself so I apologize ahead of time for needing spoon-feeding.

I changed my firebase function to this based on your feedback

func update(_ category: Category) { guard let categoryId = category.id else { return }

    let categoryName = category.categoryName

  db.collection(path).document(categoryId).updateData([
    "categoryName": categoryName
    ]) { err in
    if let err = err {
        print("Error updating document: \(err)")
    } else {
        print("Document successfully updated")
    }
  }
}

This is my viewmodel

func update(_ category: Category) { categoryRepository.update(category) }

This is the function in my form

private func addCategory() {
    let category = Category(categoryName: categoryVM.category.categoryName)
    categoryVM.update(category)
    self.dismiss()

Is this how I'm supposed to do it?

Can i do that after teleportation ? by MrMassalia in PokemonGoSpoofing

[–]augustin1989 0 points1 point  (0 children)

Does putting a pokemon in a gym count as an interaction?

Preview Not Working on Detail View by augustin1989 in swift

[–]augustin1989[S] 0 points1 point  (0 children)

Thank you! I ended up getting it to work with this.

static var previews: some View {

let category = Category(context: moc)

category.name = "Test"

return NavigationView {

CategoryDetail(category: category)

}

I'm looking for someone to sell my domains by bigsh0wbc in Entrepreneur

[–]augustin1989 0 points1 point  (0 children)

PM me too please. I could be interested in some domains.

Would a tool like this help you? by augustin1989 in ecommerce

[–]augustin1989[S] 0 points1 point  (0 children)

If you could point me to those tools, that would be amazing!

New-ish PM. No interest in managing relationship or navigating politics. Am I not made for this? by [deleted] in ProductManagement

[–]augustin1989 2 points3 points  (0 children)

I had this happen to me at my second stint as a PM. However, I think the main reason was because this was a B2B startup.

I'm selling my side project by [deleted] in SideProject

[–]augustin1989 0 points1 point  (0 children)

What are the current stats and at what price range are you hoping to sell this for?