将iOS应用程序转换为64位会导致应用程序启动时崩溃

时间:2022-04-30 15:22:38

I'm trying to convert an app from 32-bit app to 64-bit. I've had issues with TestFlight beta testers' apps crashing immediately, before the crash could be logged to TestFlight (or now, iTunes connect.) The app launch screen displays for a moment, and then a black screen is shown and the app closes.

我正在尝试将应用程序从32位应用程序转换为64位应用程序。我已经遇到问题,TestFlight beta测试人员的应用程序立即崩溃,然后崩溃可以记录到TestFlight(或现在,iTunes连接。)应用程序启动屏幕显示片刻,然后显示黑屏并关闭应用程序。

If I put the user back on a 32-bit build, they don't have any problems and their user defaults and core data are intact.

如果我将用户重新置于32位版本,他们没有任何问题,他们的用户默认值和核心数据完好无损。

Not only are the crashes not being logged, but this issue doesn't happen when the app is run from XCode. I've been able to replicate the issue a couple times by downloading an old version of the app from TestFlight, loading an old app container, and then upgrading to the 64 bit version. I haven't been able to debug the issue though, because I haven't been able to replicate it in XCode. Any ideas?

不仅没有记录崩溃,而且当从XCode运行应用程序时不会发生此问题。我已经能够通过从TestFlight下载旧版本的应用程序,加载旧的应用程序容器,然后升级到64位版本来复制该问题几次。我无法调试该问题,因为我无法在XCode中复制它。有任何想法吗?

2 个解决方案

#1


1  

Under build settings try switch the optimization levels for debug to the same settings as release and try rebuild for debug.

在构建设置下,尝试将调试的优化级别切换到与发布相同的设置,然后尝试重建以进行调试。

Remember to switch back when you find the problems, its pretty frustrating developing with release type settings.

记得在发现问题时切换回来,发布类型设置非常令人沮丧。

#2


1  

It just so turns out that I was using a 32-bit iPod for debugging! I don't know why I didn't check this before, but using the code from this question:

事实证明我使用的是32位iPod进行调试!我不知道为什么我之前没有检查过,但是使用了这个问题的代码:

Determine if iOS device is 32- or 64-bit

确定iOS设备是32位还是64位

I discovered that my iPod, which I had assumed to be 64 bit, was actually 32 bit. So it goes...

我发现我的iPod,我假设是64位,实际上是32位。所以它......

The issue itself was happening at app startup during synchronization of MPMediaPlaylists with an internal database using their persistent IDs, which seemed to be handled or stored differently in 32 bit vs 64 bit.

在使用持久ID将MPMediaPlaylists与内部数据库同步时,应用程序启动时会出现问题本身,这些ID似乎在32位与64位之间以不同方式处理或存储。

#1


1  

Under build settings try switch the optimization levels for debug to the same settings as release and try rebuild for debug.

在构建设置下,尝试将调试的优化级别切换到与发布相同的设置,然后尝试重建以进行调试。

Remember to switch back when you find the problems, its pretty frustrating developing with release type settings.

记得在发现问题时切换回来,发布类型设置非常令人沮丧。

#2


1  

It just so turns out that I was using a 32-bit iPod for debugging! I don't know why I didn't check this before, but using the code from this question:

事实证明我使用的是32位iPod进行调试!我不知道为什么我之前没有检查过,但是使用了这个问题的代码:

Determine if iOS device is 32- or 64-bit

确定iOS设备是32位还是64位

I discovered that my iPod, which I had assumed to be 64 bit, was actually 32 bit. So it goes...

我发现我的iPod,我假设是64位,实际上是32位。所以它......

The issue itself was happening at app startup during synchronization of MPMediaPlaylists with an internal database using their persistent IDs, which seemed to be handled or stored differently in 32 bit vs 64 bit.

在使用持久ID将MPMediaPlaylists与内部数据库同步时,应用程序启动时会出现问题本身,这些ID似乎在32位与64位之间以不同方式处理或存储。