Skip to content

Commit 5709002

Browse files
committed
Add search path for FIAM resource bundle since it will be embedded
1 parent c8cd11c commit 5709002

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

FirebaseInAppMessaging/Sources/DefaultUI/FIRIAMDefaultDisplayImpl.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,15 @@ + (NSBundle *)getViewResourceBundle {
6767
NSBundle *containingBundle;
6868
NSURL *bundleURL;
6969
// The containing bundle is different whether FIAM is statically or dynamically linked.
70-
for (containingBundle in @[ [NSBundle mainBundle], [NSBundle bundleForClass:myClass] ]) {
70+
for (containingBundle in @[
71+
// Statically linked.
72+
[NSBundle mainBundle],
73+
// Dynamically linked.
74+
[NSBundle bundleForClass:myClass],
75+
// Embedded static framework (zip distribution).
76+
[[NSBundle.mainBundle.bundleURL URLByAppendingPathComponent:@"Frameworks"]
77+
URLByAppendingPathComponent:@"FirebaseInAppMessaging.framework"]
78+
]) {
7179
bundleURL = [containingBundle URLForResource:bundledResource withExtension:@"bundle"];
7280
if (bundleURL != nil) break;
7381
}

0 commit comments

Comments
 (0)