Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode cannot run using the selected device after upgrade to Xcode 5.0

I upgraded to xcode 5.0 today. I then pressed play to run my project in the iOS simulator. This initially worked. Then I decided that I wanted to run the profiler. When I did that, I got the message:

Xcode cannot run using the selected device. 
Choose a destination with a supported architecture in order to run on this device.

I looked at a couple past posts on this problem and decided to do a Clean and Build. Now I can no longer run in the profiler or the simulator. I consistently get the message:

Xcode cannot run using the selected device. 
Choose a destination with a supported architecture in order to run on this device.

How can I resolve this?

Here are various settings:

My Deployment Target is 6.1

My Build Settings Architectures looks like:

I have also tried changing the deployment target to 7.0, but that did not work either

like image 585
JeffB6688 Avatar asked Sep 24 '13 19:09

JeffB6688


People also ask

What versions of iOS does Xcode 13 support?

Xcode 13 includes SDKs for iOS 15, iPadOS 15, tvOS 15, watchOS 8, and macOS Big Sur 11.3. The Xcode 13 release supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 13 requires a Mac running macOS 11.3 or later.

Does Xcode 13 Build iOS 16?

If you want to deploy the app to a physical device running iOS 16, you don't need to use Xcode 14. Xcode 13 or older can do this if you add device support files and turn developer mode ON, this is an extra step on iOS 16.


4 Answers

It appears that the problem is not related to the architecture in the build settings as the error might suggest. Rather, I found that the problem seems to be related to the Build Options Compiler for C/C++/Objective C. I was using a gcc compiler (com.apple.compilers.llvmgcc42) and Xcode 5 has marked this as unsupported.

If I change the compiler to apple's default Apple LLVM 5.0, the project builds and it can now run in the simulator. The downside is that I have a lot of compiler warnings from code related to cocos2D v1.0 source code. But, at least I have a way forward.

like image 117
JeffB6688 Avatar answered Oct 12 '22 01:10

JeffB6688


Please follow below step

1>Go to Project Build setting

2>Change compiler for c/c++/objective c as Default compiler(Apple LLVM 5.0) (see in below image)

enter image description here

like image 23
Chris Alan Avatar answered Oct 11 '22 23:10

Chris Alan


I had to change compiler for Default compiler (Apple LLVM 5.0) at two places:

  1. Build Settings > Build Options > Compiler for C/C++/Objective-C (change to LLVM)
  2. Build Rules > Files *.mc using GCC (change to LLVM)

Hard to find because code compiles even if Build Rules point to an undefined compiler.

like image 10
rjobidon Avatar answered Oct 11 '22 23:10

rjobidon


After inspecting all the build settings for 15 minutes, this worked for me (Xcode 5.0.2):

Quit and restart Xcode

like image 7
Jason Moore Avatar answered Oct 12 '22 00:10

Jason Moore