You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting multiple memory leak issues from FirebaseFirestore SDK on iOS. I tried to debug with Xcode profiling and all the leaks are related to FirebaseFirestore SDK. It works fine when I just remove .whereField(isEqualTo) from query.
Here is my code.
CODE:
func fetchUserConversations(userId: String, completion: @escaping ([UserConversation]?, Error?) -> Void) {
let collectionRef = Firestore.firestore()
.collection(FirebaseKeys.Collections.userConversations)
.document(userId)
.collection(FirebaseKeys.Collections.conversations)
let query = collectionRef
.whereField("deletedAt", isEqualTo: NSNull())
.order(by: "pinnedAt", descending: true)
.order(by: "updatedAt", descending: true)
query.getDocuments { (snapshot, error) in
if let error = error {
completion(nil, error)
} else if let snapshot = snapshot {
let conversations = snapshot.documents.compactMap { document -> UserConversation? in
do {
return try document.data(as: UserConversation.self)
} catch {
print("Error decoding UserConversation: \(error)")
return nil
}
}
// Return the conversations via the completion handler
completion(conversations, nil)
} else {
completion(nil, nil)
}
}
}
Profiling Screenshot:
Reproducing the issue
No response
Firebase SDK Version
10.29.0
Xcode Version
16.0
Installation Method
CocoaPods
Firebase Product(s)
Firestore, Messaging
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.
mirhadiali
changed the title
memory leak issue while making a query.getDocument
memory leak issue while making a query calls with **whereField(isEqualTo)**
Oct 27, 2024
mirhadiali
changed the title
memory leak issue while making a query calls with **whereField(isEqualTo)**
memory leak issue while making a query calls with whereField(isEqualTo)
Oct 27, 2024
Description
I am getting multiple memory leak issues from FirebaseFirestore SDK on iOS. I tried to debug with Xcode profiling and all the leaks are related to FirebaseFirestore SDK. It works fine when I just remove
.whereField(isEqualTo)
from query.Here is my code.
CODE:
Profiling Screenshot:
Reproducing the issue
No response
Firebase SDK Version
10.29.0
Xcode Version
16.0
Installation Method
CocoaPods
Firebase Product(s)
Firestore, Messaging
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetThe text was updated successfully, but these errors were encountered: