Skip to content

Commit

Permalink
Merge b8272e9 into 3e7aa39
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 committed Mar 12, 2024
2 parents 3e7aa39 + b8272e9 commit 0f1ae7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Firestore/Source/API/FIRFirestore.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Firestore/Source/API/FIRSnapshotListenOptions.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0f1ae7a

Please sign in to comment.