From 4272094feab9245f0de72b2098f1e93fe8d42109 Mon Sep 17 00:00:00 2001 From: mwilsnd <53413200+mwilsnd@users.noreply.github.com> Date: Wed, 6 Mar 2024 07:21:30 -0500 Subject: [PATCH] Add option to disable bundle assertion in Darwin platform (#2160) Co-authored-by: Bart Louwers --- platform/darwin/src/NSBundle+MLNAdditions.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/darwin/src/NSBundle+MLNAdditions.mm b/platform/darwin/src/NSBundle+MLNAdditions.mm index ecb13e156..5ea0a4a8f 100644 --- a/platform/darwin/src/NSBundle+MLNAdditions.mm +++ b/platform/darwin/src/NSBundle+MLNAdditions.mm @@ -9,6 +9,7 @@ const MLNExceptionName MLNBundleNotFoundException = @"MLNBundleNotFoundException + (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. @@ -17,9 +18,10 @@ const MLNExceptionName MLNBundleNotFoundException = @"MLNBundleNotFoundException 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; }