Xcode will run app on simulator but not on device

前端 未结 16 2034
予麋鹿
予麋鹿 2020-12-13 05:57

I receive the following error when trying to run the app on my device.

error: failed to launch \'/Users/michael/Library/Developer/Xcode/DerivedData/Build/Pro         


        
相关标签:
16条回答
  • 2020-12-13 06:26

    Have you looked at the Developer Certs and Distribution Certs if you have. When running in debug mode from Xcode your will need your app assigned with the developer cert and not the distribution cert. The distribution certs do not allow for debugging.

    0 讨论(0)
  • 2020-12-13 06:26

    I did these steps:

    1. Delete derived data: rm -rf ~/Library/Developer/Xcode/DerivedData
    2. Deep cleaned the project: Shift Key + Option Key + Command Key + letter K key
    3. Quit the project
    4. Quit XCode
    5. Deleted the app from my device

    When I reopened the Xcode, launched the project, and then launched the app it successively ran on my device

    0 讨论(0)
  • 2020-12-13 06:30

    I solve this by going to Targets-> Info -> Required Device capabilities and delete the option with armv7.

    Hope this helps!

    0 讨论(0)
  • This is a recurring problem that many developers are having with the current version of Xcode. The temporary workaround has been consistently deleting the DerivedData folder.

    You can add doing it to a build script or even make it a cron job:

    rm -rf ~/Library/Developer/Xcode/DerivedData

    Sad, but true.

    0 讨论(0)
  • 2020-12-13 06:30

    For me it was Command Line Tools Go to Xcode -> Preferences -> Locations -> Command Line Tools

    Make sure you select latest Xcode version. I selected Xcode 11.0, and everything started working.

    0 讨论(0)
  • 2020-12-13 06:32

    I also had this problem after changing from a lower XCode and iOS version to the current XCode and iOS version.

    I fixed this problem by changing th iOS Depolyment Target to a lower version, since my Device is not updated to the latest iOS yet. You can do this by clicking the project inside the Info tab.

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