简体   繁体   English

Hello World导致Iphone 5s死机

[英]Hello World causes Iphone 5s to freeze

I recently began going through the official Apple documentation and tutorials to learn iPhone development. 我最近开始浏览Apple的官方文档和教程,以学习iPhone开发。 I got my Iphone 5s a couple of days ago, but the sample ToDo list app that I'm making causes the device to lock up randomly when I try to test on the device. 我几天前就收到了Iphone 5s,但是当我尝试在设备上进行测试时,我正在制作的示例ToDo列表应用导致设备随机锁定。 For example, I if I make a chance to the code and build/run it on the device, it will work. 例如,如果我有机会编写代码并在设备上构建/运行它,它将起作用。 However, as I keep updating the code and testing it, eventually it will just open up my app on the device as a complete black screen, and freezes. 但是,随着我不断更新代码并对其进行测试,最终它将只是在设备上以完全黑屏的形式打开我的应用程序并冻结。 The home button then no longer works, no touch events work, the only think I can do is to hold Home+lock button until the device shuts down. 然后,主页按钮将不再起作用,触摸事件也将不起作用,我唯一能做的就是按住主页+锁定按钮直到设备关闭。

This cannot be normal, can it? 这不是正常的,可以吗? I mean, its just a basic app, what could be causing it? 我的意思是,它只是一个基本的应用程序,可能是什么引起的?

Attached is the error that shows in xcode, and also a screenshot of the Iphone when it its frozen. 附件是xcode中显示的错误,以及Iphone冻结时的屏幕截图。 Surprisingly, I was able to use the screenshot functionality on the phone... :/ 令人惊讶的是,我能够在手机上使用屏幕截图功能...:/ 在上次尝试冻结设备后,尝试再次运行该应用程序时Xcode出现错误。带有App的iPhone全黑,设备被冻结

Please check whether you are using a distribution provisioning profile/certificate to sign the app. 请检查您是否使用发行配置文件/证书对应用程序进行签名。 If you plan to debug the app on the device (use breakpoints etc.), you should sign it with a development provisioning profile. 如果您打算在设备上调试应用程序(使用断点等),则应使用开发配置文件对其进行签名。

It only happens sometimes, so it's not provisioning related. 它仅在某些情况下发生,因此与供应无关。

It causes a message to popup in XCode itself, so it's not code related. 它会导致在XCode本身中弹出一条消息,因此它与代码无关。

I had the same problems before (not that often really...). 我以前也遇到过同样的问题(不是经常这样)。 What I did was 我所做的是

  1. Restart the device 重启设备
  2. Remove the app from the device 从设备上删除应用
  3. Clear the project builds (CMD SHIFT K) 清除项目构建(CMD SHIFT K)
  4. Restart XCode. 重新启动XCode。
  5. Build & Run again 再次构建并运行

I actually haven't seen this for a while. 我实际上已经有一段时间没有看到这个了。 I always thought that they fixed the bug. 我一直认为他们修复了该错误。 Hope this helps! 希望这可以帮助!

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

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