TestFlight下载App,加载图片失效。Xcode安装App,图片加载正常。
图片在Assets.xcassets中,
UIImage *image = [UIImage imageNamed:@"图片名称"]; [[UIImageView alloc] initWithImage:image]; UIImageView *test = [[UIImageView alloc]init]; [test setImage: image];
以上方法从TestFlight下载测试App,加载图片失效。
思考:
TestFlight下载的App,是Release模式下,加载图片失效,
Xcode安装App,是Debug模式下,图片加载正常。
修复方法:
【项目Targe】-【Build Settings】-【Swift Compiler-Code Generation】-【Optimization Level】-【Release模式】修改为【No Optimization[-Onone]】
修复方法二:
请参看我以前发的文章:
提取App的ipa文件:https://www.cnblogs.com/strengthen/p/17163430.html
获取Assets文件,把不显示的图片添加到工程中。