开发者

Difference between running Iphone app through Xcode and running it through the Iphone

开发者 https://www.devze.com 2023-01-12 01:52 出处:网络
I\'m having some strange behaviour ocurring when I try to run my Iphone app without using Xcode. If I run it by choosing Build & Run in Xcode it runs just fine, but if I do it by disconnecting the

I'm having some strange behaviour ocurring when I try to run my Iphone app without using Xcode. If I run it by choosing Build & Run in Xcode it runs just fine, but if I do it by disconnecting the USB cable and tapping on the app o开发者_StackOverflown the Iphone, it crashes, yielding an unhelpful crash log.

Is there any difference between these 2 scenarios that could be causing this behaviour?


The difference is that if you run it via Xcode, the debugger is attached and a lot of restrictions are not applied. For example, if an app starts up it must respond with a few seconds otherwise it's killed. If you run it with the debugger, that restriction is lifted. Same when exiting: if you hit the home button (on iOS < 4 or iOS >= 4 without multitasking) then an app gets five seconds to exit. Not so with the debugger attached.

It might help if you post the error message from the crash log.


After having run the app out of XCode, have you terminated it? With iOS 4 it will continue to run in the background, and when you tap on the app on the iPhone, it just brought to the foreground.

Double click on the home button and see if it's still running. If so, tap on the app until the minus sign appears and tap it.

0

精彩评论

暂无评论...
验证码 换一张
取 消