diff --git a/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDevAssetsLoader.java b/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDevAssetsLoader.java index d3083600..34ea702a 100644 --- a/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDevAssetsLoader.java +++ b/doric-android/devkit/src/main/java/pub/doric/devkit/DoricDevAssetsLoader.java @@ -18,6 +18,7 @@ package pub.doric.devkit; import pub.doric.DoricContext; import pub.doric.resource.DoricAssetsLoader; import pub.doric.resource.DoricAssetsResource; +import pub.doric.resource.DoricRemoteResource; import pub.doric.resource.DoricResource; /** @@ -30,7 +31,11 @@ public class DoricDevAssetsLoader extends DoricAssetsLoader { @Override public DoricResource load(DoricContext doricContext, String identifier) { if (DoricDev.getInstance().isInDevMode()) { - + return new DoricRemoteResource(doricContext, + String.format("http://%s:7778/assets/%s", + DoricDev.getInstance().getIP(), + identifier + )); } return new DoricAssetsResource(doricContext, "assets/" + identifier); } diff --git a/doric-iOS/Devkit/Classes/DoricDevAssetsLoader.m b/doric-iOS/Devkit/Classes/DoricDevAssetsLoader.m index 50da6e54..2b2233aa 100644 --- a/doric-iOS/Devkit/Classes/DoricDevAssetsLoader.m +++ b/doric-iOS/Devkit/Classes/DoricDevAssetsLoader.m @@ -4,12 +4,16 @@ #import "DoricDevAssetsLoader.h" #import "DoricDev.h" +#import @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]; }