Skip to main content

All Questions

0 votes
0 answers
33 views

Multiple "whereField" clauses not working as expected in SwiftUI and Firestore. No error thrown, the data returned is incorrect [closed]

Trying to query a firestore collection as below. Data returned is inaccurate. db.collection("myCollection") .whereField("date", isGreaterThanOrEqualTo: Timestamp(date: ...
Nikki's user avatar
  • 1
-1 votes
2 answers
46 views

How to add data in a Firestore Database (SwiftUI) [closed]

I'm having trouble in the setup steps for adding a document to my FireStore Database. For reference, these are what my files currently look like: FirestoreDemoApp.swift import SwiftUI import ...
Remi_Zacharias's user avatar
0 votes
1 answer
39 views

Creating a document for each user in firestore using swiftUI

My swiftUI app creates a new 'favourites' Firestore document for each new user (authenticated with Firebase Auth) after they sign up. I currently do this with the code: if let authResult = result, ...
Phil's user avatar
  • 69
-1 votes
1 answer
42 views

Why isn't my @IBAction function for my UIButton being registered by the program?

I am creating a survey as a part of the app that I'm building. It should be so that if one of the multiple choice options is selected and the Next button is tapped, then the data from that answer is ...
mariaj's user avatar
  • 1
0 votes
1 answer
56 views

Firebase iOS SDK: getDocuments() call pausing the whole function and gets stuck

I have a function getStoredUser() where it gets the documents in the "users" collection where the id is equal to a userId variable and if that doesn't exist, create one. Calling getDocuments(...
octopus's user avatar
  • 13
0 votes
2 answers
77 views

Bringing array values ​containing map in firestore using Swift

I'm developing an app for my school project and I stuck in an issue and I'm not able to handle it. I’m trying to get midTerm, finalTerm and lectureGradeId values from my Firebase Cloud Firestore. ...
caneraltuner's user avatar
1 vote
1 answer
47 views

Firebase Firestore @DocumentID not conforming to Sendable

I've enabled Xcode 'strict concurrency checking' and am now getting warnings on the sample data model of a Post. struct Post: Identifiable, Codable { @DocumentID var id: String? var title: ...
Rhythmus's user avatar
  • 157
0 votes
1 answer
44 views

Unable to retrieve documents from Firestore when adding .whereField

I have added the Gemini ChatBot extension to a Firebase project. Sample: https://medium.com/google-cloud/build-a-chatbot-on-ios-with-the-firebase-gemini-api-extension-in-swift-swiftui-a-step-by-step-...
RileyDev's user avatar
  • 2,415
0 votes
0 answers
32 views

firebase function does not work correctly with swift, but works with a direct html request

I have a simple cloud function gen1 that accepts settings and returns a response from the "chat gpt" it sends, it is written in Python 3, which works great directly through the request, but ...
FOX in glases's user avatar
0 votes
0 answers
50 views

SwiftUI: @Observed new property wrapper does not update view like ObservableObject protocol

I have been using new SDK Observable and putting property wrapper @Observed on view model so that the view model would look more clean without all the @Published. But I have encountered some issues ...
Ivars's user avatar
  • 113
0 votes
1 answer
26 views

Order Documents by the most items in an array contained in another array with pagination

I am currently using this whereField on my query for documents: .whereField("tags", arrayContainsAny: ["Sports", "Fashion", "Gaming"]). Where the "tags&...
user24923683's user avatar
0 votes
0 answers
52 views

Firestore Database Query

I have a button created in code that calls the function: @objc func settingsButtonTapped() async { print("settings button tapped") await self.getMultipleAll() } I copied and pasted ...
Mason Ballowe's user avatar
0 votes
1 answer
27 views

How to deal with precision differences in Swift Date and Firestore Timestamp.dateValue()

Consider the following code: let timestamp = Timestamp(seconds: 171475088, nanoseconds: 330370000) let dateValue = timestamp.dateValue() let newTimeStamp = Timestamp(...
wshamp's user avatar
  • 141
2 votes
2 answers
79 views

GeoFire Swift Package Manager

I have tried to install GeoFire in Xcode/Swift. According to the documentation (https://firebase.google.com/docs/firestore/solutions/geoqueries), this is done by adding "GeoFire/Utils" to ...
CodeAlike's user avatar
  • 211
0 votes
0 answers
43 views

After updating Firestore, document view loses data

I have encountered quite interesting problem. I load data with .addSnapshotListener from Firestore and initial load is fine, even when I re-trigger different Firestore snapshot listener on .onReceive(...
Ivars's user avatar
  • 113

15 30 50 per page
1
2 3 4 5
162