iPhone 应用程序无法正确复制?数据库文件仅适用于临时或应用程序商店分发,不适用于开发模式

发布于 2024-08-21 13:04:23 字数 1346 浏览 4 评论 0原文

我刚刚将此问题提交给 Apple 支持,但我想知道这里是否有人遇到过类似的情况。

摘要:从 iTunes 应用商店或临时发行版下载时,我的 iPhone 应用程序崩溃,但在模拟器或 iPod 上以调试模式运行时不会“崩溃”

详细信息: 该应用程序包含一个相当大的 sqlite 数据库文件(未压缩时约 180 meg,压缩后约 56 meg)。这可能是相关的。

启动时,应用程序应该复制数据库(如果需要)。此后,用户应该看到一个包含大约 6,000 行的表视图。这些行中呈现的信息是通过读取上述数据库中的表得出的。

当我在 iPhone 模拟器中运行应用程序以及在我的 iPod 上以调试模式运行应用程序时,这一切都可以正常工作。

该应用程序已获得苹果公司的批准。然而,当用户开始通过 iTunes 下载该应用程序时,我开始收到电子邮件,称 UITableView 未填充任何信息。为了进行调查,我从应用程序商店下载了该应用程序的副本,并且看到了类似的结果(即显示了 UITableView,但行为空)。

我相信我能够使用我的应用程序的临时分发来重现该问题。

临时分发的行为与应用程序商店下载类似(即在 UITableView 中不显示任何行)。具体来说,我已多次执行以下操作(每次都删除并重新安装应用程序)。

  1. 添加我的临时配置 将证书添加到 iTunes
  2. 将我的临时应用程序构建添加到 iTunes
  3. 将我的 iPod Touch 与 iTunes 同步
  4. 启动我的临时应用程序
  5. 应用程序似乎总是在第一次启动时崩溃(即,启动屏幕显示一秒钟)然后我看到 iPod Touch 的主屏幕)
  6. 第二次以及随后启动的临时应用程序不会崩溃,但 UITableView 是空的。
  7. 当我在模拟器上运行应用程序或在同一 iPod 上以开发/调试模式部署时,这些情况都不会发生。

我尝试检查与应用程序初始崩溃相关的崩溃日志(请参阅上面的步骤 5),但当时没有创建崩溃日志。然而,当我将 iTunes 与 iPod Touch 同步时,会创建一个崩溃日志,但它也可能是用波兰语编写的。

因此,批准我的应用程序的应用程序商店审核者似乎只使用模拟器和/或在开发/调试模式下检查了应用程序的行为。该问题可能与数据库文件过大有关,但这完全是我的猜测。据我所知,应用程序大小或数据库大小不应限制在 180 兆左右。这也不一定解释为什么应用程序在调试/开发模式下工作。

有人见过类似的东西吗?

I just submitted this to Apple Support, but I'm wondering if anyone here has encountered something similar.

SUMMARY: my iphone app crashes when downloaded from the iTunes app store or from an ad-hoc distribution, but doesn't "crash" when run in debug mode on the simulator or on my iPod

DETAILS: The app contains a rather large sqlite database file (~180 meg uncompressed, 56 meg compressed). This may be relevant.

When launched, the application should copy the database (if necessary). After this, the user should be presented with a table-view containing approximately 6,000 rows. The information presented within these rows is derived from reading a table within the aforementioned database.

This all works properly when I run the application in the iPhone simulator and also when I run the application in debug mode on my iPod.

The app was approved by Apple. However, when users began to download the app through iTunes, I began receiving emails saying that the UITableView was not populated with any information. To investigate, I downloaded a copy of the app from the app store and I saw a similar result (i.e., UITableView is displayed, but the rows are empty).

I believe I am able to reproduce the problem using an ad-hoc distribution of my app.

The ad-hoc distribution behaves similarly (i.e. shows no rows in the UITableView) to the app-store download. Specifically, I have done the following multiple times (I delete and reinstall the application each time).

  1. add my ad-hoc provisioning
    certificate to iTunes
  2. add my ad-hoc app build to iTunes
  3. sync my iPod Touch with iTunes
  4. start my ad-hoc app
  5. app seems to always crash upon the first startup (i.e., the splash screen shows for a second and then I see the home screen of my iPod Touch)
  6. second and subsequent start-ups of the ad-hoc app do not crash, but the UITableView is empty.
  7. None of this happens when I run the app on the simulator or when I deploy in development/debug mode on the same iPod.

I have tried to examine crash logs associated with the initial crashing of the app (see step 5 above), but no crash log is created at that point in time. HOWEVER, a crash log is created when I sync iTunes with my iPod Touch, but it might as well be written in Polish.

So, it appears as though the app-store reviewers who approved my app only examined the behavior of the application using the simulator and/or in development/debug mode. It's possible that the issue is related to the large size of the database file, but this is complete speculation on my part. To the best of my understanding there should not be a limit on app-size or database size near 180 meg. This also wouldn't necessarily explain why the app works in debug/development mode.

Has anyone seen anything similar?

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

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

发布评论

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

评论(1

对你的占有欲 2024-08-28 13:04:23

我想我已经弄清楚了(还没有测试过)...

结果整个崩溃日志不是用波兰语写的。

有一部分说“应用程序未能及时启动”

我怀疑我的数据库太大而无法在应用程序启动期间复制。

引用苹果的话:***iPhone OS 在应用程序启动时使用看门狗定时器。如果应用程序花费太长时间才能完成其初始启动,操作系统将终止该应用程序。由于此原因终止的应用程序将具有异常代码 0x8badf00d 以及相关崩溃报告中注明的相关信息:*

*当 Xcode 启动应用程序时,看门狗计时器将被禁用,以补偿 Xcode 连接调试器时可能产生的额外开销。因此,如果您仅通过从 Xcode 运行进行测试,您的应用程序的长时间启动可能最初会引起您的注意。***

I think I figured this out (haven't tested it yet)...

Turns out the entire crash log isn't written in polish.

There's a part that says that the "application failed to launch in time"

I suspect that my database is too large to be copied during launch of the application.

to quote apple: ***iPhone OS uses a watchdog timer when applications are launched. If an application takes too long to complete its initial startup, the operating system terminates the application. Applications terminated for this reason will have the exception code 0x8badf00d and related information noted in the associated crash report:*

*When Xcode launches an application, the watchdog timer is disabled to compensate for additional overhead that may be incurred when Xcode attaches the debugger. As a result, your application's long startup may initially escape your attention if you are exclusively testing by running from Xcode.***

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