blob: 868b4ff8e64ecf7fccfd4b8487b45b7401aae810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#import "NSBundle+MGLAdditions.h"
#import "MGLAccountManager.h"
void mgl_linkBundleCategory() {}
@implementation NSBundle (MGLAdditions)
+ (instancetype)mgl_frameworkBundle
{
NSBundle *bundle = [self bundleForClass:[MGLAccountManager class]];
if (![bundle.infoDictionary[@"CFBundlePackageType"] isEqualToString:@"FMWK"]) {
// For static frameworks, the bundle is the containing application
// bundle but the resources are still in the framework bundle.
bundle = [NSBundle bundleWithPath:[bundle.privateFrameworksPath
stringByAppendingPathComponent:@"Mapbox.framework"]];
}
return bundle;
}
@end
|