Search code examples
iphonedebuggingstartupiphone-4

App from Xcode works great, but App Store version freezes on load


Has anyone ever heard of this? I'm baffled, and so is Google.

When debugging on iPhone 4 with iOS 4.1, my app shows the splash screen, then shows an animation while it loads and gets the GPS location, and finally goes to the main menu. When I download it from the App Store, it never stops loading. More strange than that, if I hide the forever-loading-app and then restore it, the load animation freezes and the app no longer responds!

I've been trying to make all kinds of guesses about what's going wrong, but nothing is working. How can I get useful information about this failure?

EDIT: App has also been tested on iPhone 3 with iOS 4.0 and iOS 4.2.1, and iPhone 4 with iOS 4.0.2 and 4.2.1.

EDIT EDIT: The problem does not occur if I do not download it from the app store. This makes it extremely difficult to debug, but hopefully narrows it down for somebody out there with more experience than I have.


Solution

  • It seems that the origin of the problem is a bug in iOS 4.1: https://devforums.apple.com/community/iphone/integration/location

    Unable to Obtain Location Information on iOS 4.1

    Michael Jurewitz at Oct 5, 2010 1:51 PM

    There is a known issue in iOS 4.1 where calls to Core Location may not succeed if the app has been removed from a device and reinstalled. Location Services in Settings may also incorrectly show that the app has access to location information. This issue is addressed in iOS 4.2 beta 2.

    To work around this issue, select Reset Location Warnings under Settings > General > Reset.

    As always, ensure your Core Location delegate properly handles any errors returned from -locationManager:didFailWithError: and -locationManager:monitoringDidFailForRegion:withError:.

    Testing based on the above information confirms that resetting location warnings resolves the issue, allowing future runs to progress beyond the loading screen. Reinstalling the app from the app store then causes the issue to occur again. This can be tested repeatedly and cyclicly with consistent results.

    To those who responded with suggestions, thank you very much for your time and effort!