From 542105eb18fa22179387236e0f9f9a05f74ef08d Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 7 May 2024 16:27:06 -0400 Subject: [PATCH] [InAppMessaging] Fix #12882 (#12910) --- FirebaseInAppMessaging/CHANGELOG.md | 4 ++++ .../Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m | 2 ++ 2 files changed, 6 insertions(+) diff --git a/FirebaseInAppMessaging/CHANGELOG.md b/FirebaseInAppMessaging/CHANGELOG.md index 6ed3ff1c7ca..9f3a86b111c 100644 --- a/FirebaseInAppMessaging/CHANGELOG.md +++ b/FirebaseInAppMessaging/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +- [fixed] Fixed crash at app start that affected SwiftPM users and CocoaPods + users using static frameworks (#12882). + # 10.25.0 - [changed] Removed usages of user defaults API to eliminate required reason impact. diff --git a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m index ed724bfcfe3..c84da5e8758 100644 --- a/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m +++ b/FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m @@ -72,10 +72,12 @@ + (NSBundle *)getViewResourceBundle { [NSBundle mainBundle], // Dynamically linked. [NSBundle bundleForClass:myClass], +#if FIREBASE_BUILD_ZIP_FILE // Embedded static framework (zip distribution). [NSBundle bundleWithURL:[NSBundle.mainBundle.bundleURL URLByAppendingPathComponent: @"Frameworks/FirebaseInAppMessaging.framework"]] +#endif // FIREBASE_BUILD_ZIP_FILE ]) { bundleURL = [containingBundle URLForResource:bundledResource withExtension:@"bundle"]; if (bundleURL != nil) break;