feat: android and iOS support load assets file remotely on dev mode
This commit is contained in:
@@ -4,12 +4,16 @@
|
||||
|
||||
#import "DoricDevAssetsLoader.h"
|
||||
#import "DoricDev.h"
|
||||
#import <DoricCore/DoricRemoteResource.h>
|
||||
|
||||
@implementation DoricDevAssetsLoader
|
||||
|
||||
- (__kindof DoricResource *)load:(NSString *)identifier withContext:(DoricContext *)context {
|
||||
if (DoricDev.instance.isInDevMode) {
|
||||
|
||||
return [[DoricRemoteResource alloc] initWithContext:context
|
||||
identifier:[NSString stringWithFormat:@"http://%@:7778/assets/%@",
|
||||
DoricDev.instance.ip,
|
||||
identifier]];
|
||||
}
|
||||
return [super load:identifier withContext:context];
|
||||
}
|
||||
|
Reference in New Issue
Block a user