Can not launch the app on device

后端 未结 11 1313
臣服心动
臣服心动 2021-02-07 14:47

When i try to launch my application from Xcode to the device, i get this error:

error: failed to launch \'/Users/Luca/Library/Developer/Xcode/DerivedData/myapp-b         


        
相关标签:
11条回答
  • 2021-02-07 15:20

    Sometimes it helps disconnecting the device and plug it again

    0 讨论(0)
  • 2021-02-07 15:22

    I also ran into this problem compiling a Cocos2D project on an iPhone 4. That was after having followed all the steps suggested by Jeff Grimes but to no avail. Everything had been working fine, so I was a bit stumped.

    The fail was a caused by change of the UIRequiredDeviceCapabilities for accelerometer from YES to NO (as the app isn't using accelerometer I decided to just drop the requirement). I changed it back and everything is fine - compiling again.

    Incidentally - I thought that changing the value of the key to NO meant that the accelerometer would just not be required. This is wrong - this breaks the compiler as it checks to make sure the device has NOT got an accelerometer, which of course returns true for most devices. So you just need to delete that row entirely if you don't need accelerometer support.

    0 讨论(0)
  • 2021-02-07 15:24
    1. Disconnect your device.
    2. Delete the app from your device.
    3. Quit Xcode completely.
    4. Go to ~/Library/Developer/Xcode/DerivedData and look at the folders there ($ ls).
    5. Find the one with the app's name in front of it and delete the folder ($ rm -rf ).
    6. Reopen Xcode.
    7. Connect your device.
    8. Build and Run the app (cmd + R).
    9. Boom.
    0 讨论(0)
  • 2021-02-07 15:24

    I have the same problem. In my case, I just upgraded the iPhone from iOS 6.1 to iOS 7.0.4. I can install the app from Xcode 5 onto the device but it could not be launched. I did a lot the above suggestion in disconnecting, removing app, remove folder and restart Xcode. It still could not work, until I reboot the iPhone. After restarting iPhone, I repeat the above and now it works.

    0 讨论(0)
  • 2021-02-07 15:30

    I just wanted to add one more tip to prevent this from happening:

    DO NOT detach your physical device before you hit the stop debugging button from xCode. This is actually the most common case after which I met the "could not launch" issue. In my case, 80% of the issue is caused by this... just accidentally detached the device during debugging...

    Keep in mind. :P

    0 讨论(0)
提交回复
热议问题