diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm index 29b56fd2a6b..f6dbf9dc059 100644 --- a/Firestore/Source/API/FIRFirestore.mm +++ b/Firestore/Source/API/FIRFirestore.mm @@ -567,12 +567,14 @@ - (void)terminateInternalWithCompletion:(nullable void (^)(NSError *_Nullable er #pragma mark - Force Link Unreferenced Symbols extern void FSTIncludeFSTFirestoreComponent(void); +extern void FSTIncludeFIRSnapshotListenOptions(void); -/// This method forces the linker to include all the Analytics categories without requiring app +/// This method forces the linker to include all Firestore symbols without requiring app /// developers to include the '-ObjC' linker flag in their projects. DO NOT CALL THIS METHOD. + (void)notCalled { NSAssert(NO, @"+notCalled should never be called"); FSTIncludeFSTFirestoreComponent(); + FSTIncludeFIRSnapshotListenOptions(); } @end diff --git a/Firestore/Source/API/FIRSnapshotListenOptions.mm b/Firestore/Source/API/FIRSnapshotListenOptions.mm index 9e22d686428..c1cb4216d43 100644 --- a/Firestore/Source/API/FIRSnapshotListenOptions.mm +++ b/Firestore/Source/API/FIRSnapshotListenOptions.mm @@ -58,6 +58,11 @@ - (FIRSnapshotListenOptions *)optionsWithSource:(FIRListenSource)source { return newOptions; } +/// This function forces the linker to include `FIRSnapshotListenOptions`. +/// See `+[FIRFirestore notCalled]`. +void FSTIncludeFIRSnapshotListenOptions(void) { +} + @end NS_ASSUME_NONNULL_END \ No newline at end of file