This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-iOS/Devkit/Classes/DoricDevAssetsLoader.m

20 lines
780 B
Mathematica
Raw Normal View History

//
// Created by pengfei.zhou on 2021/12/7.
//
#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];
}
@end