views:

177

answers:

2

I'm trying to troubleshoot why a release build doesn't work on the device but a debug version does. With a release build, the app starts, default PNG displays and the app dies. I've commented everything out of applicationDidFinishLaunching, which means it isn't a code issue. I see this error in the console:

Mon Jan 18 21:17:39 unknown com.apple.debugserver-43[1579] : error: MachTask::StartExceptionThread (): task invalid, exception thread start failed.

I have it configured as a device release build and have assigned my app store provisioning profile to it. Any ideas on what could be wrong or what the above error means?

+1  A: 

Get Info on your project or target and compare your properties between Debug and Release configurations. Instinct says, something must be different that doesn't need to be different.

Kevin Conner
Is there a way to compare those without flipping through them and eye balling everything?
4thSpace
Show Package Contents of your .xcodeproj package, and open project.pbxproj in a text editor. Search for "Release" and "Debug" and you'll find short sections with all the overridden properties for those configurations. I'd start a new project and compare against that project's .pbxproj as well, just to see what differences are normal.
Kevin Conner
Kevin, there's UI for that right in the Build Settings inspector. Show "Settings Defined at This Level" instead of "All Settings."
cdespinosa
Oh! Much better.
Kevin Conner
+1  A: 

You can't use the app store provisioning profile to load onto your device. That will only work for submitting it to Apple. You can make an Ad-Hoc provisioning profile to use, but your Development profile should be enough.

nevan
Yes - the developer profile works. I made a duplicate of the release configuration and signed it with the developer profile. If I don't crash in this configuration, chances are my submission to Apple should not crash either?
4thSpace
Yep, that's right. It's a little strange that your app store build allowed you to get as far as a Default.png. Usually the build fails before it can even run. You might want to try "Clean Build", then quit Xcode, delete the Build folder in your project and re-build. The build process is still buggy in Xcode.
nevan
Cool. Thanks. I had recently got a rejection because of a [NSObject doesNotRecognizeSelector:]. I use two custom static libraries and I'm betting one of them wasn't an update to date build. Since I don't see the issue anymore with my Release build, I'm hoping all is well now.
4thSpace
I hope so. Good luck with it.
nevan