Skip to content

Commit

Permalink
[Infra] Sync messaging with recent 1P infra changes (#13793)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Oct 3, 2024
1 parent ba8623f commit 64aedfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions FirebaseMessaging/Sources/FIRMessaging+ExtensionHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ + (FIRMessagingExtensionHelper *)extensionHelper {
return extensionHelper;
}

#if SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE
/// Stub used to force the linker to include the categories in this file.
void FIRInclude_FIRMessaging_ExtensionHelper_Category(void) {
}
#endif // SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE

@end
5 changes: 4 additions & 1 deletion FirebaseMessaging/Sources/FIRMessaging.m
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,9 @@ + (NSString *)FIRMessagingSDKCurrentLocale {
}

#pragma mark - Force Category Linking

#if SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE
extern void FIRInclude_FIRMessaging_ExtensionHelper_Category(void);
#endif // SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE
extern void FIRInclude_NSDictionary_FIRMessaging_Category(void);
extern void FIRInclude_NSError_FIRMessaging_Category(void);

Expand All @@ -1030,7 +1031,9 @@ + (NSString *)FIRMessagingSDKCurrentLocale {
/// This method forces the linker to include categories even if
/// users do not include the '-ObjC' linker flag in their project.
+ (void)noop {
#if SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE
FIRInclude_FIRMessaging_ExtensionHelper_Category();
#endif // SWIFT_PACKAGE || COCOAPODS || FIREBASE_BUILD_CARTHAGE || FIREBASE_BUILD_ZIP_FILE
FIRInclude_NSDictionary_FIRMessaging_Category();
FIRInclude_NSError_FIRMessaging_Category();
}
Expand Down

0 comments on commit 64aedfc

Please sign in to comment.