iOS app cannot be opened after update

风流意气都作罢 提交于 2019-12-06 10:35:58

In general there can be multiple issues happening on startup:

  1. A required library is not linked correctly: But this can NOT be the issue, since then all app starts would crash!

  2. Startup is taking taking too long and the app is killed by the watchdog.

    This could be your problem if you are doing e.g. migration of a lot of data on the main thread right in the applicationDidFinishLaunching: runloop and hence the app is not responsive for user input and hence will be killed by the watchdog after about 20 seconds.

    Make sure to do migration without blocking the main thread!

  3. You are experiencing a crash (not a kill!) on startup. Since the app crashes before the HockeyApp SDK can send the crash, you won't be able to get those crash reports.

    The HockeyApp iOS SDK provides a mechanism to handle these, follow the instructions given in the following page: http://support.hockeyapp.net/kb/how-tos-faq/how-to-handle-crashes-during-startup-on-ios

So either 2. or 3. are your issue. If you have a chance to directly contact a user who is affected, you could ask for the iOS generated crash report. Otherwise check the recommendations I gave.

We had this problem once. The app worked fine as an Ad Hoc build. Apple tested and approved it; however, end users would crash immediately upon opening.

For us, it turned out to be that we were not properly passing our HockeyApp production API key in correctly.

Once we got that fixed users were good to go. For Example:

[[BITHockeyManager sharedHockeyManager] configureWithBetaIdentifier:@"betaKeyHere"
                                                     liveIdentifier:@"liveKeyHere"
                                                           delegate:self];
nebillo

I can't believe it, but I finally found the reason why the app crashes.

[[NSLocale currentLocale] objectForKey: NSLocaleCountryCode] sometimes returns nil. I made the assumption this was always valid, but apparently I was wrong.

I found this other question here NSLocaleCountryCode returns nil. it should be the right place for a follow up on this issue.

Thanks to @kerni suggestion I was able to made hockeyapp send reports of application launching crashes, but unfortunately this wasn't enough to understand what happened: the stack trace of the report was not clear.

After a couple of tries, I discovered another bad bad thing related to flurry. This was capturing the system exceptions and avoid hockeyapp to correctly handle the crash and produce a reasonable report. This discussion was very helpful for me to identify and correct my flurry integration code: http://support.hockeyapp.net/discussions/questions/1359-more-information-for-crashes-with-reason-no-reason-found

After this change, I was finally able to see a decent crash report on hockeyapp and identify my issue: the current locale.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!