AppCode targeted device families not valid (iPad iOS 8.1)
Asked Answered
C

5

6

I keep getting this error in AppCode, but usually it runs just fine with Xcode:

Error:xcodebuild: error: The run destination iPad Mini is not valid for Running the scheme 'Appname'.
Error:iPad Mini doesn't match any of Appname.app's targeted device families. You can expand Appname.app's targeted device families to support iPad Mini.
Error:Build failed with 2 errors and 0 warnings in 7 sec
Note:Building for 2 architectures.
Double click to set 'ONLY_ACTIVE_ARCH=YES' to speed up compilation.

Target sdk is 7.1 in AppCode 3.0.6 (Xcode 6.1)
TARGETED_DEVICE_FAMILY = 2 (iPad)
VALID_ARCHS = armv7 armv7s i386 arm64
Architectures = Standard architectures (armv7, arm64)

I have the problem with both an iPad Mini with iOS 8.1 and a iPad 4 with iOS 7.1.

Any idea why it will not work from AppCode?

Charlottcharlotta answered 11/11, 2014 at 8:12 Comment(2)
I had that as well.Did you try EAP 3.1? Fixed it for meBrassie
Yes - that fixes it. Thanks - please make an answer with it @brainray.Charlottcharlotta
B
2

I had that as well: Xcode builds fine, Appcode does not. There is no evident reason for that - the target etc looks fine. It seems to be a bug in AppCode 3.0.6 that seems to be fixed in the 3.1 EAP version. With 3.1 the project builds fine here.

Brassie answered 12/11, 2014 at 9:8 Comment(3)
I'm using AppCode 3.1.2 and i'm getting this problem. Sometimes it works but most the time it doesn't. I don't like having to go to Xcode just to run the app :-(Sibbie
Are you sure that you have assigned the right version of Xcode in Appcode? Prefs->Tools->XcodeBrassie
Yeah, I only have one version of Xcode on my machine. 6.1.1 (6A2008a)Sibbie
S
3

According to JetBrains, it's a problem with the xcodebuild tool in Xcode 6 rather than being an issue with AppCode. Hopefully something Apple will fix soon!

https://youtrack.jetbrains.com/issue/OC-11204

Sibbie answered 3/2, 2015 at 13:4 Comment(1)
When my Xcode 6.3 is building for "Universal" than AppCode 3.1.5 is building and running on my iPad. When Xcode is building for iPad only than the error is occuring: "Error:xcodebuild: error: The run destination ... is not valid for Running the scheme..."Apopemptic
B
2

I had that as well: Xcode builds fine, Appcode does not. There is no evident reason for that - the target etc looks fine. It seems to be a bug in AppCode 3.0.6 that seems to be fixed in the 3.1 EAP version. With 3.1 the project builds fine here.

Brassie answered 12/11, 2014 at 9:8 Comment(3)
I'm using AppCode 3.1.2 and i'm getting this problem. Sometimes it works but most the time it doesn't. I don't like having to go to Xcode just to run the app :-(Sibbie
Are you sure that you have assigned the right version of Xcode in Appcode? Prefs->Tools->XcodeBrassie
Yeah, I only have one version of Xcode on my machine. 6.1.1 (6A2008a)Sibbie
C
2

Just had this problem as well in Appcode. If you set "Targeted Device Family" in Appcode's target to "1,2" (iPhone and iPad), it worked here.

Captain answered 21/4, 2015 at 9:35 Comment(1)
This is the workaround suggested in AppCode OC-11204 while we are waiting for a bug fix from Apple. Go to Xcode change targeted device family to universal, just ignore the other devices and then you can build in AppCode.Stigmatic
L
2

Go To Build Settings -> in search bar, search "targeted"

change in Universal

enter image description here

Lethe answered 2/8, 2019 at 8:32 Comment(1)
In Xcode 14.1 now its iPhone, iPad option instead of Universal.Kitsch
B
1

You need to check Development info like development target, Device and match with the simulator device.

Barrens answered 6/3, 2019 at 9:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.