|
@@ -466,10 +466,6 @@
|
|
|
{
|
|
{
|
|
|
return [self urlForAsset:path];
|
|
return [self urlForAsset:path];
|
|
|
}
|
|
}
|
|
|
- else if ([path hasPrefix:@"app://"])
|
|
|
|
|
- {
|
|
|
|
|
- return [self urlForAppInternalPath:path];
|
|
|
|
|
- }
|
|
|
|
|
else if ([path hasPrefix:@"base64:"])
|
|
else if ([path hasPrefix:@"base64:"])
|
|
|
{
|
|
{
|
|
|
return [self urlFromBase64:path];
|
|
return [self urlFromBase64:path];
|
|
@@ -517,7 +513,7 @@
|
|
|
{
|
|
{
|
|
|
NSFileManager* fm = [NSFileManager defaultManager];
|
|
NSFileManager* fm = [NSFileManager defaultManager];
|
|
|
NSBundle* mainBundle = [NSBundle mainBundle];
|
|
NSBundle* mainBundle = [NSBundle mainBundle];
|
|
|
- NSString* bundlePath = [mainBundle bundlePath];
|
|
|
|
|
|
|
+ NSString* bundlePath = [mainBundle resourcePath];
|
|
|
|
|
|
|
|
if ([path isEqualToString:@"res://icon"]) {
|
|
if ([path isEqualToString:@"res://icon"]) {
|
|
|
path = @"res://AppIcon60x60@3x.png";
|
|
path = @"res://AppIcon60x60@3x.png";
|
|
@@ -562,26 +558,6 @@
|
|
|
return [NSURL fileURLWithPath:absPath];
|
|
return [NSURL fileURLWithPath:absPath];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/**
|
|
|
|
|
- * URL for an internal app path.
|
|
|
|
|
- *
|
|
|
|
|
- * @param [ NSString* ] path A relative file path from main bundle dir.
|
|
|
|
|
- *
|
|
|
|
|
- * @return [ NSURL* ]
|
|
|
|
|
- */
|
|
|
|
|
-- (NSURL*) urlForAppInternalPath:(NSString*)path
|
|
|
|
|
-{
|
|
|
|
|
- NSFileManager* fm = [NSFileManager defaultManager];
|
|
|
|
|
- NSBundle* mainBundle = [NSBundle mainBundle];
|
|
|
|
|
- NSString* absPath = [mainBundle bundlePath];
|
|
|
|
|
-
|
|
|
|
|
- if (![fm fileExistsAtPath:absPath]) {
|
|
|
|
|
- NSLog(@"File not found: %@", absPath);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return [NSURL fileURLWithPath:absPath];
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* URL for a base64 encoded string.
|
|
* URL for a base64 encoded string.
|
|
|
*
|
|
*
|