diff options
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/asset_root.mm | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/platform/darwin/asset_root.mm b/platform/darwin/asset_root.mm index f47f5d36d1..a4a3d13c88 100644 --- a/platform/darwin/asset_root.mm +++ b/platform/darwin/asset_root.mm @@ -2,24 +2,13 @@ #include <mbgl/platform/platform.hpp> -@interface MGLApplicationRootBundleCanary : NSObject -@end - -@implementation MGLApplicationRootBundleCanary -@end - namespace mbgl { namespace platform { // Returns the path to the root folder of the application. const std::string &assetRoot() { static const std::string root = []() -> std::string { - NSString *path = [[NSBundle bundleForClass:[MGLApplicationRootBundleCanary class]] pathForResource:@"Mapbox" ofType:@"bundle"]; - if (!path) { - path = [[[NSBundle mainBundle] resourceURL] path]; - } - return {[path cStringUsingEncoding : NSUTF8StringEncoding], - [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]}; + return [[[[NSBundle mainBundle] resourceURL] path] UTF8String]; }(); return root; } |