iPhone 应用程序在 iPad 上崩溃(仅限)

发布于 2024-09-25 19:36:33 字数 323 浏览 0 评论 0原文

我正在制作一个应用程序,用户可以从在线数据库获取每日书籍推荐。这一切在 iPhone 和 iPod Touch 上都运行良好,但在 iPad 上启动时会崩溃 (SIGABRT)(首先显示 default.png)。

在控制台中跟踪的错误是“由于未捕获的异常‘NSRangeException’而终止应用程序,原因:‘* -[NSCFArray objectAtIndex:]:索引 (0) 超出界限 (0)'”。 iPad 模拟器上也会出现这种情况。

任何人都可以阐明这一点吗?我将不胜感激!

顺便说一句:我有 4.0 作为 Base SDK 部署目标是 3.1.3

I am making an app where the user gets daily book recommendations from an online database. This all works just fine on iPhone and iPod Touch, but crashes (SIGABRT) on iPad on launch (default.png is shown first).

The error that is traced in the console is "Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'". This happens on the iPad simulator as well.

Can anyone shed any light on this? I would be most grateful!

btw: I have 4.0 as Base SDK deployment target is 3.1.3

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静待花开 2024-10-02 19:36:33

在 objc_exception_throw 上放置断点可以让您准确地找到问题发生的位置(您试图从空数组中获取元素)。

Putting a breakpoint on objc_exception_throw will let you find where exactly the problem occurs (you are trying to get an element from an empty array).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文