“The run destination iOS Device is not valid for running the scheme”

前端 未结 28 1471
闹比i
闹比i 2020-12-13 12:09

I\'ve been running my app on an iPhone 5 /iOS 6, but when I try to run it on an iPhone 4S / iOS6 I get \"The run destination iOS Device is not valid for running the scheme N

相关标签:
28条回答
  • 2020-12-13 12:09

    For me Xcode failed to copy symbols for connected device due to low disk space. First check if you have symbols connected device under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/.

    Since I had iOS 8.3 (12F70) installed on my device the path for me was /Users/$USERNAME/Library/Developer/Xcode/iOS DeviceSupport/8.3 (12F70)/Symbols The size of this directory should be around 2.5GB. When I got this issue the size was 484 KB.

    To fix it I

    1. Free up about 3GB of disk space. You can delete folders for any unsupported devices that you might have under /Users/$USERNAME/Library/Developer/Xcode/iOS\ DeviceSupport/
    2. Disconnected device from Xcode and closed Xcode.
    3. Removed the folder in above path (everything under 8.3(12F70).
    4. Start Xcode and connected the device.
    5. Xcode should start Copying symbols once done the size of the folder should be around 2.5GB
    0 讨论(0)
  • 2020-12-13 12:10

    This happened to me because I switched branches in source control with unshared schemes.

    My xcuserdata folder was git-ignored, and it contained a scheme I forgot to share. This meant I was trying to use a scheme that was from a completely different code branch.

    I remade the scheme which fixed the problem, and marked it as shared so that it would be in the xcshareddata folder and checked into source control.

    0 讨论(0)
  • 2020-12-13 12:11

    Go to project info set development Target as 4.3 or 5.1.1 and same in target also.

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

    In my Case,

    I open my iPhone here is the alert appearing in my iPhone for Trust and Don't Trust. I click on Trust. It works fine.

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

    Swift 3 or 4 Xcode 8 or 9 One thing you can do is click the Project file to open up General Settings, Capabilities etc.

    1. Choose Build Settings
    2. Search for Base SDK
    3. Make sure debug AND release have the same build type.

    I had debug set to ios 11.0 and release set to macOS 10.13 They must be the same in order to Archive

    0 讨论(0)
  • 2020-12-13 12:15

    I had the same problem. The issue that i found is that , by mistake I had chosen iPad as deployment target due to which XCode showed that iPhone 5 is an invalid device. . Hope it helps. Then I just changed the target to iPhone and it worked.

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