App crashes on iPhone but not on simulator

 ̄綄美尐妖づ 提交于 2019-12-23 10:58:24

问题


I'm using XCode 7.0b5 and created an Swift app. It runs fine on simulator but crashes on iPhone 4s when running independently (without cable). How can identify where it crashes? I read about possible memory issues. I'm reading in a large textfile, so it needs nearly 200 MB of ram. How can I check it?


回答1:


I think this is a memory problem with the iPhone 4S (200 mb for 4S is a lot). You should read the crash logs in Xcode.

In Xcode with the iPhone connected you can go to Window->Devices, select your phone and press 'View Device Logs'. You will see a list with all the last crashes of the apps and with the information of the crash.

Regards




回答2:


I got the solution. It is the run time. I reduced the file sizes to 10% of the original and everything runs fine. So I can test it and "improve" it to the speed limit of the iPhone 4S. :-)



来源:https://stackoverflow.com/questions/32308920/app-crashes-on-iphone-but-not-on-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!