From f7645725be44de731e712ac96d79fa5ba6c5fb90 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:00:41 -0400 Subject: [PATCH] [Firestore] Add unlinked symbol introduced in #12370 (#12534) --- Firestore/Source/API/FIRFirestore.mm | 4 +++- Firestore/Source/API/FIRSnapshotListenOptions.mm | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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