Tutorial :App crashed in Beta on the device, but not in debug


I've created a Beta ad hoc delivery profile, and when I press 'build and run' on the device in beta mode, my app crashes after I press a button.

However, when I use the app in debug mode (on the device) it works fine. It also works fine in the simulator and on the device in beta mode (when it's not connected to XCode)

Any ideas what's up here? It doesn't bother me too much since I can debug in debug mode...but I'm wondering when it comes to the submission process, if this will be a problem?


EDIT: Would this happen to be because I've got an entitlements file (dist.plist) with the option 'get-task-allow' unchecked? I tried checking this box but got an error "The executable was signed with invalid arguments"


There are many areas that can be the culprit. You may have an #if or #ifdef DEBUG, or you could have (more likely) some source or xib that is not included in the Beta Target.

You should be looking in the log, whether during its run via Xcode or after when you plug the device back into your Mac and look at the log file using the Organizer window, for more details of the crash. If it is related to clicking on a button, look at the path between the the button's actions set in the xib and the selector in your code. Sprinkle some NSLogs in there to help you out.


I have experienced this with applications that interact with other systems where timing is critical and debug mode affects the timing of the interaction with the other systems. Specifically when screen scraping an IBM mainframe but any time critical application may experience this.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »