简体   繁体   中英

iPhone app under dev crashes if phone not connected through XCode

I tried this on a few devices, I have an iOS app that crashes when my phone is not connected via XCode.

Steps I follow:

1) Open XCode Project, connect phone to Mac
2) Launch app through XCode
3) App fully works
4) Unplug cable
5) Click again on app Icon -> crash after spashscreen

Would anyone have any idea where I could look to figure out this problem ? As its only occuring while unplugged, I have no logs.

PS: Also I have submitted this app to the App store (as I didn't notice before) and Apple accepted it. Which means their process didn't even find this problem.

Had the same problem. It's the way you terminate the debugging process. Just add another step:

1) Open XCode Project, connect phone to Mac

2) Launch app through XCode

3) App fully works

4) STOP the application (from XCode)

5) Unplug cable

6) Click again on app Icon -> crash after spashscreen

You can look at the logs that were recorded when the app crashed by plugging it back into your Mac, opening Xcode, going to the Organizer ( CMD+SHIFT+2 ) and looking at the Console for your device. Hopefully here you should be able to see what's causing the crash.

Just for future reference, I had a problem like this, somewhere in my hap I had a CFRelease( NULL); and that caused the crash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM