Skip to content

Commit

Permalink
Add option to disable bundle assertion in Darwin platform (#2160)
Browse files Browse the repository at this point in the history
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
  • Loading branch information
mwilsnd and louwers authored Mar 6, 2024
1 parent 56e4126 commit 4272094
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platform/darwin/src/NSBundle+MLNAdditions.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ @implementation NSBundle (MLNAdditions)
+ (instancetype)mgl_frameworkBundle {
NSBundle *bundle = [self bundleForClass:[MLNSettings class]];

#ifndef MLN_CUSTOM_COMBINED_BUNDLE
if (![bundle.infoDictionary[@"CFBundlePackageType"] isEqualToString:@"FMWK"]) {
// For static frameworks, the bundle is the containing application
// bundle but the resources are in Mapbox.bundle.
Expand All @@ -17,9 +18,10 @@ + (instancetype)mgl_frameworkBundle {
bundle = [self bundleWithPath:bundlePath];
} else {
[NSException raise:MLNBundleNotFoundException
format:@"The Mapbox framework bundle could not be found. If using the Mapbox Maps SDK for iOS as a static framework, make sure that Mapbox.bundle is copied into the root of the app bundle."];
format:@"The MapLibre framework bundle could not be found. If using the MapLibre Native for iOS as a static framework, make sure that MapLibre bundle is copied into the root of the app bundle."];
}
}
#endif

return bundle;
}
Expand Down

0 comments on commit 4272094

Please sign in to comment.