iOS module config

This commit is contained in:
pengfei.zhou
2019-07-26 18:15:51 +08:00
parent f0b003cb66
commit bc1c283b47
12 changed files with 242 additions and 99 deletions

1
iOS/Pod/Assets/doric-lib.js Symbolic link
View File

@@ -0,0 +1 @@
../../../js-framework/bundle/doric-lib.js

View File

@@ -0,0 +1 @@
../../../js-framework/bundle/doric-sandbox.js

View File

@@ -37,6 +37,9 @@ -(void)initDoricEnvironment {
[self.jsExecutor injectGlobalJSObject:INJECT_REQUIRE obj:^(NSString *name){
}];
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"doric-sandbox" ofType:@"js"];
NSString *mainjs = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
NSLog(@"read:%@",mainjs);
[self.jsExecutor loadJSScript:@"nativeLog('w','log from js')" source:@""];
}