summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSURL+MGLAdditions.m
blob: 09fdd5c880fec54c552ec59d8f8b057933c10d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#import "NSURL+MGLAdditions.h"

@implementation NSURL (MGLAdditions)

- (nullable NSURL *)mgl_URLByStandardizingScheme {
    if (!self.scheme) {
        // Relative file URL, already escaped (in order to create the NSURL).
        // Assume a relative path into the application’s resource folder.
        return [NSURL URLWithString:[@"asset://" stringByAppendingString:self.absoluteString]];
    }
    return self;
}

@end