diff --git a/doric-cli/assets-lib/iOS/Classes/TemplateLibrary.m b/doric-cli/assets-lib/iOS/Classes/TemplateLibrary.m index e333786a..5e30d4f3 100644 --- a/doric-cli/assets-lib/iOS/Classes/TemplateLibrary.m +++ b/doric-cli/assets-lib/iOS/Classes/TemplateLibrary.m @@ -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:@"__$__"];