Files
MapLibreParticleLab/platform/darwin/src/NSURL+MGLAdditions.m
2016-09-30 14:57:26 +02:00

15 lines
426 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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