cli: update iOS lib template, fix use framework cannot read bundle from main bundle
This commit is contained in:
parent
89023368b5
commit
d0fce08ede
@ -3,7 +3,7 @@
|
||||
|
||||
@implementation __$RawName__Library
|
||||
- (void)load:(DoricRegistry *)registry {
|
||||
NSString *path = [[NSBundle mainBundle] bundlePath];
|
||||
NSString *path = [NSBundle bundleForClass:self.class].bundlePath;
|
||||
NSString *fullPath = [path stringByAppendingPathComponent:@"bundle___$__.js"];
|
||||
NSString *jsContent = [NSString stringWithContentsOfFile:fullPath encoding:NSUTF8StringEncoding error:nil];
|
||||
[registry registerJSBundle:jsContent withName:@"__$__"];
|
||||
|
Reference in New Issue
Block a user