"The run destination iOS Device is not valid for running the scheme"
Asked Answered
O

30

117

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 NN. The Scheme contains no buildables that can be built for the architectures supported by the run designation device".

I've looked at previous postings on this but they involve issues with the Deployment Target. In my case I've got the Base SDK set to 6.1 and the Deployment Target set to 5.0.

The iPhone 4 has got iOS version 6.0.1.

Oolite answered 17/4, 2013 at 0:57 Comment(1)
this issue can occur as well when you use not original lightning wire to connect your device to mac where your xCode is running. It may label your device as "unsupported devices" category even tho your device will be visible among other devices and available to select.Rum
O
287

It was a bug in XCode, I closed and reopened Xcode and it started working.

I've noticed this sort of thing many many times now with Xcode with other problems, its very frustrating that the tool is so dodgy.

Oolite answered 17/4, 2013 at 3:12 Comment(2)
Quitting XCode and restarting still works in XCode 9.0.1.Forswear
This bug exists in Xcode 11.4.1. Quitting Xcode does not fix it. Cmon AppleHendry
H
31

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. enter image description here . Hope it helps. Then I just changed the target to iPhone and it worked.

Haggi answered 28/1, 2016 at 6:44 Comment(2)
similarly, I had chosen an iPhone 7 Plus for an iPad app, so I just flipped the simulator selector to iPad and warning goes away.Setter
can one not have a universal app that also supports Watch?Nataline
N
21

The run destination iPhone is not valid for Running the scheme.

  • Quit Xcode
  • Open Xcode
  • Clean project
  • Run project

It will work

Navarro answered 20/11, 2018 at 9:50 Comment(2)
One word: Restart the Xcode will fixed the problem.Pebble
restarting XCode didn't work for meLandreth
A
18

This is some sort of memory issue sometimes.Close some application and try again.

Close Xcode too and reopen. Worked for me.

Cheers.

Asare answered 28/8, 2018 at 15:46 Comment(0)
C
8

Quit and Reset Xcode can reslove most problem. The other cause is Device not support iPhone, you can

Target -> select scheme -> General -> Deployment Info -> Device-> select Universal or the current device you want.

enter image description here

Collazo answered 24/9, 2018 at 2:35 Comment(0)
C
7

In my case the problem was missing executable value selected into Scheme -> Profile -> Executable (e selected from the dropdown build configuration debug and executable the "application".app).

enter image description here

Coshow answered 20/10, 2017 at 14:23 Comment(1)
Product -> Scheme -> Edit Scheme or click on the top icon which displays the app icon close to the play icon...Coshow
R
4

A simple solution.

1) Force quit X-Code

2) Force quit itunes

3) Reconnect iPhone

4) Open X-Code

Radiotelephone answered 28/7, 2018 at 8:55 Comment(0)
D
3

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

Deter answered 11/9, 2014 at 9:38 Comment(0)
L
3

Just Go to Devices -> The Intended device you wanted to run (I Was iPhone6 Simulator)-> Select the Device (I was selected iPhone6) -> Right Click-> Make sure the ‘Show the Run Destination Menu’ enabled.

For Me, it was enabled. I did, it worked.

Levitate answered 19/6, 2017 at 13:34 Comment(0)
K
3

I had this problem in XCode 9.0.1.

It seems that XCode does not refresh the list of connected devices.

You may notice that after disconnecting your device, you can still choose it as a target. So XCode may actually be trying to connect to a bogus device.

To fix this:

  1. Edit the scheme.
  2. Re-select the scheme's executable.
    • this seems to force XCode to update the list of connected devices.

If that did not work, try reconnecting your device (cable) before you do this.


Or perhaps, some other combination of disconnecting device, connecting device, and re-selecting the scheme's executable.

As a desperate measure, you may also try to change the cable that connects your mobile device to your pc.

But ideally... Xcode should be fixed.

Kilmarnock answered 18/10, 2017 at 17:33 Comment(1)
:O ... my hero!!! Why though? Why is Xcode this buggy, each iteration, almost always getting worse ... it's so frustrating they have low priority for their Dx!!!Nataline
B
2

I faced this issue in XCode 9, but later realised that for some reasons I had unchecked run destination in "Devices & Simulators" window

enter image description here

Bigler answered 30/1, 2018 at 7:1 Comment(0)
J
2

In my case, none of the answers given worked for me.

I was trying to setup TravisCI to my project and this is what i did:

Select Target > Edit Scheme > Build

enter image description here

Check the "run" option in the Tests target and the issue disappeared, i hope this help someone, i spent 2 days trying to fix this.

Jugulate answered 8/12, 2019 at 16:4 Comment(0)
S
2

Other solutions might work for other scenarios but, in case using Xcode 11, I went into "Build Settings" of my test target and changed to universal under "Deployment"->"Targeted Device Family"

enter image description here

Soave answered 6/7, 2020 at 9:27 Comment(0)
S
1

Select your project, Under Targets, select your main target, then on the Build Settings Tab, there is one field that says "Valid Architectures". Make sure "armv7" is also there. You probably only have armv7s right now.

Shifra answered 17/4, 2013 at 1:9 Comment(2)
Thanks for replying, however armv7 is currently already there along with armv7s.Oolite
try removing armv7s and see if it allows u to run itShifra
M
1

I am using XCode 8.2.1 having same problem.

Solution:

->Go to Devices

-> Add additional simulators

->Right Click simulator u are using

->Show in Run Destination Menu <-Enable this Option

Magnesite answered 6/10, 2017 at 12:5 Comment(0)
T
1

Device Support Files is missing for device iOS version. Add it in XCode App Content path.

App Content Path is "contents/Developer/platform/iPhoneOS.platform/DeviceSupport"

Dowloaded support files from here and past them by creating folder of device version number there in app content path.

To answered 15/9, 2021 at 17:5 Comment(0)
P
0

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
Pyrotechnic answered 7/8, 2015 at 17:48 Comment(0)
S
0

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.

Soupy answered 25/2, 2016 at 0:8 Comment(0)
B
0

For my case, check the target -> Build Settings -> Search "Mach-O Type" and check the value, it should be Executable/Dynamic Library/Static Library. For other type values, the target could NOT be built and run.

Bloody answered 16/12, 2016 at 8:42 Comment(0)
S
0

This is similar to Kunal Gupta's comment, but I got this error after running an Xcode project on an actual iPad (the deployment target was changed to iPad and I wanted to run it on my iPhone simulator). Remember to change the deployment info after you use an actual device/simulator, especially when switching from iPad to iPhone.

Scimitar answered 21/5, 2017 at 21:59 Comment(0)
P
0

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

Patino answered 7/10, 2017 at 9:26 Comment(0)
P
0

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.

enter image description here

Perfectible answered 5/1, 2018 at 13:20 Comment(0)
D
0

Switching to a different USB port and restarting Xcode solved the problem. Experienced this issue on iMac running Xcode 9.1 whenever I tried connecting any iOS device to one specific USB port. If your USB ports stopped working, check this.

  • Open the Apple Menu > About this Mac > More Info > System Report > USB and check that the device appears in the USB Device Tree. If it is not here try another USB cable.

enter image description here

Determination answered 20/2, 2018 at 22:3 Comment(0)
A
0

I notice this with certain cable+device combinations (probably bad contact), restarting the XCode will only help for one or two runs and then it strikes again. Changing cable / device is the only long term solution worked for me.

Aboard answered 12/7, 2018 at 8:29 Comment(0)
H
0

In my case, this issue was fixed changing the Architectures (Build Settings --> Architectures) to Standard architectures - $(ARCHS_STANDARD)

Make sure to have arm64 armv7 armv7s on Valid Architectures.

Hooray answered 26/9, 2018 at 23:2 Comment(0)
E
0

In the case of iOS 13.x - What worked for me is unpairing my watch to my phone and repairing it to my iPhone. I wouldn't just unpair it via Bluetooth- I repeated the whole cycle as if I got a new watch. It took 10 mins to do the whole thing. When I ran my app again, it worked. From there, ensure all your Targets have the same sign in for identity.

Egbert answered 1/1, 2020 at 3:33 Comment(0)
D
0

Go To General => Supported Destinations add IPhone or whatever platform you want run your app.

Default answered 26/10, 2022 at 12:15 Comment(0)
S
0

I encountered this issue while trying to run a watchOS app. After restarting both the Apple Watch and the iPhone, it displayed a different error message that informed me about the Developer Mode setting being turned off:

The run destination iPhone is not valid for Running the scheme 'My Watch App'.

To use Apple Watch for development, enable Developer Mode in Settings → Privacy & Security.

I turned on the Developer Mode setting, restarted Xcode, waited for a bit and it started working again.

Stentorian answered 21/12, 2022 at 15:6 Comment(0)
M
-1

So the problem is likely because of the device target setting in Xcode. When you want to archive an app in Xcode, you need to make sure you’re not targeting a simulator. You should select a real device or the "Any iOS Device (arm64)" option in the target device menu at the top of Xcode.

Monocotyledon answered 4/4 at 3:35 Comment(0)
S
-2

Make sure your Xcode is up to date.

This might sound obvious. I tried all the answers presented in this threat and nothing would help. I used Xcode 12.0. After upgrading to 13.1, everything worked as expected.

Seurat answered 27/10, 2021 at 6:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.