As of #2746, we no longer bundle any styles with the SDK, so the asset: URL scheme is unused. Instead, point asset: to the application root for developer convenience and consistency with the Android and default asset roots. Also fixed an issue that prevented relative URLs from being treated as asset: URLs. Fixes #1208, fixes #3050.
17 lines
367 B
Plaintext
17 lines
367 B
Plaintext
#import <Foundation/Foundation.h>
|
|
|
|
#include <mbgl/platform/platform.hpp>
|
|
|
|
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 {
|
|
return [[[[NSBundle mainBundle] resourceURL] path] UTF8String];
|
|
}();
|
|
return root;
|
|
}
|
|
}
|
|
}
|