转载

Reason- image not found

前言

今天想帮徒弟fix个bug的,结果一真机运行时,出现了闪退,而且是必闪退。用模拟器是没有问题的,不过在真机好像是有问题,不确定是否是所有机型。使用iPhone6运行是必闪退的,在此记录下来,以便后来者可直接找到解决方案。

崩溃日志

  dyld: Library not loaded: @rpath/Pods.framework/Pods   Referenced from: /var/mobile/Containers/Bundle/Application/3A970A35-A52F-45D7-A4D5-55C849349C75/QuanJie.app/QuanJie   Reason: image notfound   

这是镜像找不到,而这里是Pods.framework找不到,而引起的必闪问题。

解决办法

老外的一段话:

Okay, fixed. The issue was the Pods.framework was set to required and not optional. It wasn’t being copied to device by the .sh script and so the app crashed. Setting this to optional fixed the issue.

大概意思是说,这个问题是Pods.framework设置成required而不是optional。在运行时,它会被.sh脚本拷贝到设备上,因此导致app崩溃。将required修改为optional就可以fix这个问题了。

在哪里设置?如下图所示:

Reason- image not found

参考

  • CocoaPods issues 3586

关注我

关注 账号 备注
Swift/ObjC技术群一 324400294 群一若已满,请申请群二
Swift/ObjC技术群二 494669518 群二若已满,请申请群三
Swift/ObjC技术群三 461252383 群三若已满,会有提示信息
关注微信公众号 iOSDevShares 关注微信公众号,会定期地推送好文章
关注新浪微博账号 标哥的技术博客 关注微博,每次发布文章都会分享到新浪微博
关注标哥的GitHub CoderJackyHuang 这里有很多的Demo和开源组件
关于我 进一步了解标哥 如果觉得文章对您很有帮助,可捐助我!
原文  http://www.henishuo.com/reason-image-not-found/
正文到此结束
Loading...