Skip to content

Commit f764572

Browse files
authored
[Firestore] Add unlinked symbol introduced in #12370 (#12534)
1 parent 3e7aa39 commit f764572

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Firestore/Source/API/FIRFirestore.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,14 @@ - (void)terminateInternalWithCompletion:(nullable void (^)(NSError *_Nullable er
567567
#pragma mark - Force Link Unreferenced Symbols
568568

569569
extern void FSTIncludeFSTFirestoreComponent(void);
570+
extern void FSTIncludeFIRSnapshotListenOptions(void);
570571

571-
/// This method forces the linker to include all the Analytics categories without requiring app
572+
/// This method forces the linker to include all Firestore symbols without requiring app
572573
/// developers to include the '-ObjC' linker flag in their projects. DO NOT CALL THIS METHOD.
573574
+ (void)notCalled {
574575
NSAssert(NO, @"+notCalled should never be called");
575576
FSTIncludeFSTFirestoreComponent();
577+
FSTIncludeFIRSnapshotListenOptions();
576578
}
577579

578580
@end

Firestore/Source/API/FIRSnapshotListenOptions.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ - (FIRSnapshotListenOptions *)optionsWithSource:(FIRListenSource)source {
5858
return newOptions;
5959
}
6060

61+
/// This function forces the linker to include `FIRSnapshotListenOptions`.
62+
/// See `+[FIRFirestore notCalled]`.
63+
void FSTIncludeFIRSnapshotListenOptions(void) {
64+
}
65+
6166
@end
6267

6368
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)