7

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.

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 di luca
  • 147
  • 1
  • 10
  • 2
    You can download the update on your iPhone, connect with Xcode and check crash reports. It will show you all the crash reports from each and every appp which is installed on your iPhone. Make sure you delete your app which is installed from Xcode download fresh copy from App Store and then let it crash and then check the crash report as I suggested. – TeaCupApp Jul 04 '12 at 00:19

5 Answers5

6

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

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.

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

Abhi Beckert
  • 32,787
  • 12
  • 83
  • 110
  • I've just detected a message in console "exited abnormally with signal 9: Killed: 9" – stefano di luca Jul 04 '12 at 00:47
  • I think that just means "the kernel killed the app". One possible reason is your app is using too much memory. – Abhi Beckert Jul 04 '12 at 00:49
  • If your app ever takes more than 20 seconds to do something it gets killed. Look for loops that are running too long in your initialization. ESPECIALLY, DID YOU FORGET THE "i++" IN A WHILE LOOP? – bkbeachlabs Jul 04 '12 at 01:16
  • @aking63 the problem you are referring it should be evident in simulator and xCode installation too. The app is killed 0.1 sec after tapping the icon, the application does not even get to show the splash screen. – stefano di luca Jul 04 '12 at 10:05
  • @AbhiBeckert I have to compile with a distribute or developer profile? You said "installing on a blank device after uninstalling your app *and any profiles in Settings -> General -> Profiles" but if I install on a device without certificates the app can't start. – stefano di luca Jul 04 '12 at 10:27
  • When you export for enterprise/ad-hoc deployment the profile will be bundled in the ipa file and installed automatically as part of installing the app. Removing any existing profiles will confirm your ipa is setup properly. – Abhi Beckert Jul 05 '12 at 04:18
2

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.

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

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.

Meet
  • 4,904
  • 3
  • 24
  • 39
  • Thank you for your suggestion. For me that would not explain why it just crashes on some devices and updates just fine on other devices. Any ideas? – stefano di luca Jul 04 '12 at 12:50
  • 1
    @stefanodiluca, This may happen with devices with varied iOS versions. – Meet Jul 05 '12 at 06:01
  • still auto close the app even set Foundation framework as optional instead of required. And still same issue even i set all framework be as optional – MAS. John Mar 20 '18 at 17:03
0

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.

bkbeachlabs
  • 2,121
  • 1
  • 22
  • 33
  • I've downloaded on a different device from the App store and it crash when started..I can not explain how it can work if installed with xCode or testflight and not from appstore.. – stefano di luca Jul 04 '12 at 00:36
  • @stefanodiluca your app crashes when updated from App Store but, does it crashes if a fresh new install is done? That is, have you tested removing previous app before downloading? – Gabriel Jul 04 '12 at 05:06
  • @Gabriel I've tested both, update and a new fresh install. First I've updated the app and it has crashed. Next I've deleted and reinstalled from the store and it has crashed again. Finally I've deleted e redownloaded and now it work.. This is very strange.... – stefano di luca Jul 04 '12 at 10:02
0

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

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

kentb
  • 31
  • 2
0

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.

Dattatray Deokar
  • 1,923
  • 2
  • 21
  • 31