应用程序在iPhone上崩溃,但在模拟器上没有崩溃 [英] App crashes on iPhone but not on simulator

查看:99
本文介绍了应用程序在iPhone上崩溃,但在模拟器上没有崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XCode 7.0b5,并创建了一个Swift应用。它可以在模拟器上正常运行,但是在独立运行(没有电缆)时在iPhone 4s上崩溃。
如何识别崩溃的位置?我读到有关可能的内存问题。我正在阅读一个大文本文件,因此它需要近200 MB的内存。我该如何检查?

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?

推荐答案

我认为这是iPhone 4S的内存问题(4S占用200 mb的内存很多) )。您应该在Xcode中读取崩溃日志。

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.

在已连接iPhone的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.

问候

这篇关于应用程序在iPhone上崩溃,但在模拟器上没有崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆