Xcode 4 says “finished running ” on the target

2019-01-07 01:50发布

The app neither installs nor runs on my device. All provisioning profiles are up to date. I've already tried deleting and re-installing them.

The status bar shows that Xcode is building my project, then it says running my project on , then it says "finished running ." Throughout this entire period, the iPod screen stays black. The iPod is being detected in the Organizer and I don't see anything wrong with its configuration. Everything was working perfectly just a couple days ago with Xcode 3.

It doesn't work on the simulator, but it may be important to note that in the simulator it appears to get stuck on "Attaching to " and the simulator refuses to start.

24条回答
甜甜的少女心
2楼-- · 2019-01-07 02:18

I just had this too. I had added a UIRequiredDeviceCapabilities section to info.plist, requiring gamekit, and the app would not get copied onto an iPhone 3G running iOS 4.2. Removed the required capability, all is well.

查看更多
手持菜刀,她持情操
3楼-- · 2019-01-07 02:18

My solution was to add UIInterfaceOrientationPortrait to the UISupportedInterfaceOrientations array in Info.plist, even though my app does not support portrait.

查看更多
姐就是有狂的资本
4楼-- · 2019-01-07 02:19

For those still floundering, another thing that I had to do was make the name of my target's product the same for Debug and Release configurations. It had been "running" the Debug version, which I was not building.

查看更多
地球回转人心会变
5楼-- · 2019-01-07 02:20

Just restart the device. Do an clean project. Delete the app from the device and Rebuild.

查看更多
SAY GOODBYE
6楼-- · 2019-01-07 02:22

Make sure that the deployment target version is <= the iOS version on your device. This is how i solved this problem.

查看更多
Melony?
7楼-- · 2019-01-07 02:23

Mine case: I mistakenly set the: Required device capabilities -> accelerometer to NO (in Info.plist). Just have to set it back to YES

Also: Make sure that the Required device capabilities is of the proper type: i.e. Boolean or String. The wrong type will invariably make the test fail, and the app not load.

查看更多
登录 后发表回答