iOS 应用程序在一个模拟器上运行良好,但在设备上运行不佳

标签 ios ios-simulator

因此,如果我在设备上运行应用程序,我将在目标输出中收到此错误。然而它在模拟器上运行良好。

2013-05-30 12:02:43.983 SBrand[2887:907] viewDidAppear:<UIView: 0x1d5b5e20; frame = (0 0; 320 333); autoresize = TM+BM; layer = <CALayer: 0x1d5b5e80>>
2013-05-30 12:02:43.992 SBrand[2887:907] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x311812a3 0x38e1b97f 0x310ccb75 0x6e853 0x6d80d 0x6a86b 0x32ff0311 0x3300cf27 0x3300ceaf 0x32f92a33 0x311566cd 0x311549c1 0x31154d17 0x310c7ebd 0x310c7d49 0x34c892eb 0x32fdd301 0x69e83 0x69dd0)
libc++abi.dylib: terminate called throwing an exception

我不知道该去哪里查找,因为我不知道 __NSArrayM 是什么。该应用程序似乎加载正常,但在某些 View 已加载但某些 View 未加载后,它卡住在第一页上。

最佳答案

看起来您甚至在分配数组之前就正在访问它!或者数组中没有在 viewDidAppear 方法中访问的对象。请核对!

关于iOS 应用程序在一个模拟器上运行良好,但在设备上运行不佳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16828319/

相关文章:

iphone - EXC_BAD_ACCESS 访问 NSMutableData

ios - 当我向 iOS 请求许可时,可以更改措辞并重新定义按钮吗?

ios - 断言失败 : UI Testing Failure - Failure fetching attributes for element

ipad - 在 iPad 模拟器中调试 Web 应用程序

iphone - 如何创建 DMG 文件?

ios - 检查 iOS 模拟器类型和版本

ios - 使用推送弹出导航在多个 View Controller 之间传递数据时出现问题

iOS 模拟器不显示 Xcode 6.3 的内容

iphone - 如何从 iOS 应用程序发送 POST XML?

iphone - 如何查找安装在 iPhone 中的应用程序