xcode 更新后 iPhone 应用程序立即崩溃

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11320903/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:46:41  来源:igfitidea点击:

iPhone app crash immediately after update

iphoneiosxcodecrash

提问by stefano di luca

today my app update it has been released in the store, when updated or downloaded for the first time the app immediately crash on start.

今天我的应用程序更新已在商店中发布,当第一次更新或下载应用程序时,它会在启动时立即崩溃。

I've tested the app on simulator and on device (the same where I've installed the update from the store) and I never experienced this problem.

我已经在模拟器和设备上测试了该应用程序(与我从商店安装更新的地方相同)并且我从未遇到过这个问题。

My update it has been submitted with Organizer after the archiving, in the Distribute section.

我的更新已在存档后提交给 Organizer,位于“分发”部分。

Apple do not perform these types of controls before to release an app?

苹果在发布应用程序之前不执行这些类型的控制吗?

Anyone experienced a similar problem? I have no idea what could be the cause.. Thank you, Stefano.

任何人都遇到过类似的问题?我不知道可能是什么原因..谢谢你,Stefano。

回答by Abhi Beckert

Here's the best way to test a production build without deploying to the store:

这是在不部署到商店的情况下测试生产版本的最佳方法:

  • Set your build Scheme to "iOS Device"
  • Do an Archive build
  • Select your archive and click Distribute
  • Choose "Save for Enterprise or Ad-Hoc Deployment"
  • Pick your code signing cert
  • After saving the ipa file, use Apple's iPhone Configuration Utility(*) to install it on your device
  • 将您的构建方案设置为“iOS 设备”
  • 做一个存档构建
  • 选择您的存档并单击分发
  • 选择“Save for Enterprise or Ad-Hoc Deployment”
  • 选择您的代码签名证书
  • 保存 ipa 文件后,使用 Apple 的 iPhone 配置实用程序 (*) 将其安装到您的设备上

You should always perform two tests:

您应该始终执行两个测试:

  • installing on a blank device after uninstalling your app *and any profiles in Settings -> General -> Profiles"
  • installing over the top of the previous version of your app, to make sure any files/preferences/etc are properly converted to the new format
  • 卸载您的应用程序后在空白设备上安装 * 以及“设置”->“通用”->“配置文件”中的任何配置文件”
  • 安装在之前版本的应用程序之上,以确保任何文件/首选项/等都正确转换为新格式

(*) the iPhone Configuration Utility is mostly used for enterprise app deployment, but it's also useful for developers and is available as a free download for mac and windows at support.apple.com. You can also use iTunes instead, but it's convoluted.

(*) iPhone 配置实用程序主要用于企业应用程序部署,但它对开发人员也很有用,可在 support.apple.com 上免费下载 mac 和 windows。您也可以改用 iTunes,但它很复杂。

As for why your app is crashing? No idea... it could be anything. Standard debugging advice applies.

至于为什么你的应用程序崩溃?不知道......它可以是任何东西。标准调试建议适用。

回答by Meet

The issue is related to the Framework. I had this exact error. It wasn't a case of logic as it was crashing before the AppDelegate was even called and my usage of NSMetadataQuery was much later in the life cycle than that.

该问题与框架有关。我有这个确切的错误。这不是一个逻辑案例,因为它在 AppDelegate 甚至被调用之前就崩溃了,而且我对 NSMetadataQuery 的使用在生命周期中比那晚得多。

It turns out that weak linking the Foundation framework was required.

事实证明,需要弱链接 Foundation 框架。

Problem was solved by changing (under the Project Info in Xcode) the dependency option of the Foundation.framework from required to optional. Check for any such frameworks.

通过将 Foundation.framework 的依赖项选项从必需更改为可选(在 Xcode 中的项目信息下)解决了问题。检查任何此类框架。

回答by kentb

This happened to our app also, and apparently, other apps too. Apple is aware of the problem and is currently working on a solution.

这也发生在我们的应用程序上,显然,其他应用程序也是如此。Apple 意识到了这个问题,目前正在研究解决方案。

see this article: http://techcrunch.com/2012/07/05/apple-responds-to-app-crashing-issues-has-a-dedicated-team-working-on-a-fix/

见这篇文章:http: //techcrunch.com/2012/07/05/apple-responds-to-app-crashing-issues-has-a-dedicated-team-working-on-a-fix/

回答by Dattatray Deokar

If you are using core data & you have updated database in your latest version without versioning core data in that case app crashes on launch after update.

如果您正在使用核心数据并且您在最新版本中更新了数据库而没有对核心数据进行版本控制,那么在这种情况下,应用程序在更新后启动时会崩溃。

回答by bkbeachlabs

Try deleting any old versions of the app you have on your device, and reinstall. Also try on a different device, maybe with a different apple id to your developer account.

尝试删除设备上所有旧版本的应用程序,然后重新安装。还可以尝试不同的设备,可能对您的开发者帐户使用不同的 Apple ID。