加载自定义Bundle中的资源文件

自定义Bundle路径如下,需要获取到Info.plist文件:


自定义Bundle路径.png

1.从mainbundle中获取 自定义.bundle
2.再从 自定义.bundle 中获取对应的文件

NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"IMUIInputViewAssets" ofType:@"bundle"];
NSString *path = [[NSBundle bundleWithPath:bundlePath] pathForResource:@"Info" ofType:@"plist" inDirectory:@"com.apple.emoji"];
    
NSDictionary *dic = [NSDictionary dictionaryWithContentsOfFile:path];
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容