diff options
Diffstat (limited to 'platform/ios/src/NSBundle+MGLAdditions.m')
-rw-r--r-- | platform/ios/src/NSBundle+MGLAdditions.m | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/platform/ios/src/NSBundle+MGLAdditions.m b/platform/ios/src/NSBundle+MGLAdditions.m index d5842ea596..05d8f5c87c 100644 --- a/platform/ios/src/NSBundle+MGLAdditions.m +++ b/platform/ios/src/NSBundle+MGLAdditions.m @@ -1,31 +1,14 @@ #import "NSBundle+MGLAdditions.h" -#import "MGLMapView.h" +#import "MGLAccountManager.h" -@implementation NSBundle (MGLAdditions) +void mgl_linkBundleCategory() {} -void mgl_linkBundleCategory(){} +@implementation NSBundle (MGLAdditions) -+ (NSString *)mgl_resourceBundlePath ++ (instancetype)mgl_frameworkBundle { - NSString *resourceBundlePath = nil; - - // check for resource bundle in framework bundle (Fabric, premade framework) - // - NSString *frameworkBundlePath = [NSString stringWithFormat:@"%@/Mapbox.framework/Mapbox.bundle", - [[NSBundle mainBundle] privateFrameworksPath]]; - if ([NSBundle bundleWithPath:frameworkBundlePath]) resourceBundlePath = frameworkBundlePath; - - // check for resource bundle in app bundle (static library) - // - if ( ! resourceBundlePath) resourceBundlePath = [[NSBundle bundleForClass: - [MGLMapView class]] pathForResource:@"Mapbox" ofType:@"bundle"]; - - // fall back to resources directly in app bundle (test app) - // - if ( ! resourceBundlePath) resourceBundlePath = [[NSBundle mainBundle] bundlePath]; - - return resourceBundlePath; + return [self bundleForClass:[MGLAccountManager class]]; } @end |