Reputation: 533
I am receiving the following error when I try to run my Xcode iOS project:
Xcode cannot run using the selected device. Choose a destination with a supported architecture in order to run on this device.
I have had this error for a while now. I was able to get around it by using an actual device instead of a simulator, but now that doesn't work either. I haven't changed a single setting in the project since creating it, all that I have changed is the code itself. This has also happened before and the only way I fixed it was to create a new project and start from scratch and now it is happening again from that. I am so frustrated! I have no idea what to do. What info do I need to provide to help diagnose this? I am using the facebook sdk 3.1 if that means anything.
Thanks
Upvotes: 11
Views: 19029
Reputation: 5220
In XCode 6 I opened the Devices window (Window/Devices) and noticed my iPhone was not listed there, even though it was plugged in to the mac at that time. I unplugged it and then plugged it right back in while the Devices window was open, and it appeared in the device list and also in the scheme picker.
Upvotes: 0
Reputation: 6969
If that doesn't work, try this:
See below image - you must delete all lines containing 'Provisioning Profile' till the ; character.
Upvotes: 11
Reputation: 1
I had the same problem, and fixed it by opening the info.plist file in Resources and unchecked the target membership so that nothing is checked as target membership.
Upvotes: 0
Reputation: 6472
Check that the Executable File (also known as CFBundleExecutable) in the Info.plist file is set to ${EXECUTABLE_NAME} as opposed to any hardcoded value. This will ensure that even if you change your project name or target name or scheme name, that it still works.
Upvotes: 2
Reputation: 713
I had this error when trying to test my app. Here's what worked for me:
In Targets > Build Settings, I changed the Product Name to match the Target name and this fixed it for me.
Upvotes: 0
Reputation: 149
I found the error was because of unsupported compiler in building settings. Check Project Building Settings --> Build Options --> Compiler for C/C++/Objective-C. Change to "Default compiler (Apple LLVM 5.0)". Everything is OK.
Upvotes: 1
Reputation: 336
Target -> Build Settings -> Build Options set the "Compiler for C/C++/Objective-C" - "Default compiler (Apple LLVM 5.0)" and the issue will be solved
Upvotes: 14
Reputation: 911
I had this error when trying to run a DEBUG build. I changed "Build Active Architecture" to YES for DEBUG and this error finally went away after hours of frustration. I tried about 10 different things that I read on this site and nothing else worked.
Upvotes: 1
Reputation: 71
Please Check the following: -Connect your device with another cable. -Check if the cable is properly connected. This was my problem Thanks
Upvotes: 1