简体   繁体   English

应用程序仅在iPhone 4s和5s中崩溃

[英]App crashing in iPhone 4s and 5s only

My app is crashing in iPhone 4S and iPhone 5S only, works fine in all other devices and simulators. 我的应用仅在iPhone 4S和iPhone 5S中崩溃,在所有其他设备和模拟器中均能正常运行。 堆栈和日志信息

I have checked for IBOutlet connection issues also checked for keyPath values in User Defined Run time attributes section of the concerned view.. 我已经检查也查的keyPath值在用户定义的运行时间属性有关视图的部分IBOutlet中连接问题..

EDIT: I put breakpoint in ViewDidLoad () and ViewWillAppear () even that is not getting called. 编辑:我把断点在viewDidLoad中()和viewWillAppear中(),甚至是没有得到调用。 App crashes before that.. 应用在此之前崩溃。

Error Log clearly saying that you have problem with key-value for any class. 错误日志清楚地说,你有任何类键值问题。 Please check again. 请再次检查。 Or if you are storing anything in user default and update your code then you should first remove previous install app. 或者,如果你是存储在用户默认的东西,并更新你的代码,那么你应该先删除以前安装的应用程序。

Open the xib or storyboard in xcode, select File's Owner and click on the Connection Inspector (upper right arrow), to see all outlets at once. 在xcode中打开xibstoryboard xib ,选择“ File's Owner ,然后单击“ Connection Inspector (右上角箭头),一次查看所有出口。 Look for ! 寻找! s which indicates a missing outlet. s表示缺少插座。

The issue is that you don't have a proper IBOutlet connnection to one of your viewController. 问题是,你没有一个适当的IBOutlet中connnection您的viewController之一。 Just go through with all the viewController connections in your xib files. 只需通过xib文件中的所有viewController连接即可。 Better unlink and link them again this might can solve the issue as every connection will be checked and connected again. 更好地断开链接,并再次将它们链接这个力量可以解决问题,因为每个连接将被选中并再次连接。

Open the storyboard/xib corresponding to the viewcontroller/views in there. 打开与其中的视图控制器/视图相对应的情节提要/ xib。 For each item, check the "User Defined Runtime Attributes" in the "Identity Inspector" (3rd tab on right pane) and check whether an attribute with "keypath" is created there. 对于每个项目,请检查“身份检查器”(右窗格中的第三个选项卡)中的“用户定义的运行时属性”,并检查是否在其中创建了带有“键路径”的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM