Xcode will run app on simulator but not on device

前端 未结 16 2035
予麋鹿
予麋鹿 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:32

    I struggled with this problem for 2 days and went through all the posts, tried all the options including, restarting Xcode, device, deleting DerivedData folder etc.

    Finally, the problem was with the Info.plist file. In my case, I had improper icon paths in the Info.plist file. I suggest you to archive the application and then validate it to get the exact problem in you case. Only when I did that, I was able to find the issue.

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

    For me restarting of Xcode, cleaning DerivedData and restaring device wasn't enough in most cases, until I had figured out that iTunes was also running, and after quitting iTunes everything worked fine!

    So my steps now are simple:

    1. Quit Xcode.
    2. If iTunes is running, quit iTunes.
    3. Reopen project.

    No need to remove app from the device, clean project or restart/disconnect device. I think that's because Xcode and iTunes use some common libraries (as you know, Xcode Installer always asks to quit iTunes on installing iOS SDK).

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

    As Chronos mentiod, the device capabilities might be the reason. In addition I would say that in my case it was all about the UIRequiresPersistentWiFi key, which (for some unclear reason) didn't let me to install my app on an iPhone4. Hope this helps ones who tried everything else and haven't fixed the problem yet.

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

    I solved this problem many times with DhilipSiva's solution. However, it may not work sometimes. If that is the case, consider deleting and re-adding the target.

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

    I stumbled upon this same problem on several diferent projects, researched a lot on forums and even here on Stack overflow. A lot of solutions were given, and some people seemed to get them working, but none of them worked for me. So we tried some pretty obvious course of action, which for some reason we didn't tought about before: I've done a CHMOD -R 777 on the EXACT path indicated by the error message (I copied it directly).

    Worked like a charm, 100% times!

    Hope it helps, guys!

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

    I solve this by going to Targets-> Info -> Required Device capabilities and check id at 0 index if armv7 not in 0 index then remove other things and armv7 set on 0 index and clean app connect device and run.

    Hope this helps fine!

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