2323
2424NSMutableDictionary *emulatorConfigs;
2525static __strong NSMutableDictionary *snapshotsInSyncListeners;
26- static NSString *const RNFB_FIRESTORE_DOCUMENTS_IN_SYNC = @" firestore_snapshots_in_sync_event" ;
26+ static NSString *const RNFB_FIRESTORE_SNAPSHOTS_IN_SYNC = @" firestore_snapshots_in_sync_event" ;
2727
2828@implementation RNFBFirestoreModule
2929#pragma mark -
@@ -242,7 +242,7 @@ + (BOOL)requiresMainQueueSetup {
242242 resolve (nil );
243243}
244244
245- RCT_EXPORT_METHOD (addSnapshotsInSyncListener
245+ RCT_EXPORT_METHOD (addSnapshotsInSync
246246 : (FIRApp *)firebaseApp
247247 : (NSString *)databaseId
248248 : (nonnull NSNumber *)listenerId
@@ -251,10 +251,10 @@ + (BOOL)requiresMainQueueSetup {
251251 NSString *appName = [RNFBSharedUtils getAppJavaScriptName: firApp.name];
252252 NSString *firestoreKey = [RNFBFirestoreCommon createFirestoreKeyWithAppName: appName
253253 databaseId: databaseId];
254- NSDictionary *serialized = [RNFBFirestoreSerialize documentSnapshotToDictionary: snapshot
255- firestoreKey: firestoreKey];
256- [[RNFBRCTEventEmitter shared ]
257- sendEventWithName: RNFB_FIRESTORE_DOCUMENTS_IN_SYNC
254+ FIRAddSnapshotsInSync *addSnapshotsInSync =
255+ [RNFBFirestoreCommon getFirestoreForApp: firebaseApp databaseId: databaseId]. addSnapshotsInSync
256+ [[RNFBRCTEventEmitter shared]]
257+ sendEventWithName:RNFB_FIRESTORE_SNAPSHOTS_IN_SYNC
258258 body:@{
259259 @" appName" : [RNFBSharedUtils getAppJavaScriptName: firApp.name],
260260 @" databaseId" : databaseId,
0 commit comments