iOS 应用程序在手机上崩溃,但在 iPhone 模拟器中完美运行
调试它的最佳方法是什么?它只是在电话上“崩溃”,没有消息,什么也没有。模拟器运行得很好。仅发生在 UIViewController 之一上,不知道为什么......
What is the best way to debug that? It just "crashes" on the phone, no message, nothing. Simulator is doing just fine. Happens on only one of the UIViewController's, not sure why...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议你添加 NSZombieEnabled 并将其设置为 YES 在你的环境中,你可以在项目 - >编辑活动可执行文件 - >(转到 Agruments 选项卡)中设置它并添加到要在环境中设置的变量,这样你就可以看到(如果你幸运的话)问题出在哪里。请记住在将应用程序上传到商店之前将其删除。
您还可以从商店下载此应用程序。
I suggest you to add NSZombieEnabled and set it to YES in your enviornment, you can set this in Project->Edit active executable->(go to Agruments tab) and add to Variables to be set in enviornment, so you can see(if you are lucky) where is the problem. Remember to remove it before the upload of your app on the store.
You could also download this app from the store.
在设备上运行时附加调试器,看看是否产生这种情况。否则,请检查管理器中的设备日志。当应用程序崩溃时,日志会留在设备上。可以对它们进行符号化以找出这些信息。
Attach the debugger when running on the device, see if it is produced that case. Otherwise, check the device logs in the organizer. Logs are left on the device when the app crashes. They can be symbolicated to find out this information.
在安装新版本时,您是否已竭尽全力彻底清除以前安装的应用程序?真实设备上安装的旧版本残留与新安装之间的不一致可能会导致这种情况。
Have you gone out of your way to completely clean out prior installations of your app when installing the new version? Inconsistencies between remnants of the old version installed on the real device and the new install can lead to this situation.