一.创建bundle
(1)Targes中添加bundle
image.png
image.png
(2)bundle设置
在target中选择新建的bundle
image.png
设置如下:
-
Base SDK
设置为Latest iOS (iOS XX.X)
-
Build Active Architecture Only
设置为YES
-
Installation Directiotory
删除掉后面的路径 -
Code Signing Identity
选择Don't Code Sign
-
iOS Deployment Target
设置为iOS 8.0
(为了兼容性,最好选择最低版本) -
Skip Install
设置为NO
-
Strip Debug Symbols During Copy
中Release
模式设置为YES
-
COMBINE_HIDPI_IMAGES
设置为NO
-
Enable Bitcode
设置NO
二.生成bundle
(1)将资源文件拖进左侧文件夹
(2)
command
+B
生成xxxx.bundle
三.图片资源,xib资源的调用
图片调用:
UIImage *image=[UIImage imageNamed:@"auth.bundle/iconxxx"]
xib使用:
NSString *path = [[NSBundle mainBundle] pathForResource:@"auth" ofType:@"bundle"];
NSBundle *SDKBundle = [NSBundle bundleWithPath:path];
TouchIDViewController *vc = [[TouchIDViewController alloc] initWithNibName:@"TouchIDViewController" bundle:SDKBundle];
//TouchIDViewController是xib文件对应的Controller
网友评论