记录一下,注意修改bundle的文件名
- (void)loadScriptAtPath:(NSString *)path {
NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"bundleName" ofType:@"bundle"]];
NSString *script = [NSString stringWithContentsOfFile:[bundle pathForResource:@"fileName" ofType:@"fileType"] encoding:NSUTF8StringEncoding error:NULL];
}
网友评论