XCode 4.5 (4G182) + iPhone 5 iOS6 - Choose a destination with a supported architecture in order to run on this device
Asked Answered
N

17

29

So I have a brand new app I created last night for iOS6, using XCode 4.5. I can properly develop on my iPhone 4 with iOS6.

Today I got my new iPhone 5 with iOS6 and, after updating the certificates with the new device UUID, I tried to run my app on it and got this error:

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

I've enabled the device for development. Both armv7 and armv7s are on the settings.

I have included the sources from the Facebook 3.0 SDK and the linker flag '-lsqlite3.0'. I'm guessing the issue has to be related, but cannot figure what is wrong.

Any ideas how to solve it?

PS: The issue happens too when running the app on the simulator. No idea what changed on my project or XCode between last night and today, other than I have a new device and new certificates.

The selected destination does not support the architecture for which the selected software is built. Switch to a destination that supports that architecture in order to run the selected software.

Nowhither answered 22/9, 2012 at 3:52 Comment(1)
Don't add a compiler flag directly. Try adding the sqlite library the same way you add frameworks. All the dynamic libraries are there and the build system will then generate the correct linkages (LP64 for the simulator, armv7s for the A6 and armv7 for the A5)Tisbe
W
43

Also you need to select the compiler LLVM in

Project --> Build Settings --> Build Options

enter image description here

Whelk answered 3/12, 2013 at 18:18 Comment(0)
R
25

I have found the same issue while running an OLD project on XCode 5.0 and My solution is:

You need to do following steps for getting out with this:

1. Set Valid Architectures : armv7,armv7s

2. Set compiler as LLVM in Project ---> Build Settings ---> Build Options. See attached image below

3. Set Base and Deployment sdk properly.

This is my solution. Happy To Help.

Robi answered 27/12, 2013 at 9:24 Comment(0)
M
10

You need to add armv7s to your valid architectures under your Target's Build Settings.

Changing Valid Architectures

Morpheus answered 22/9, 2012 at 4:15 Comment(2)
I have those settings in there. Weird. I'm thinking it must have to do something with the sources of the Facebook 3.0 SDK and the linker flag -lsqlite3.0. I just updated the post with all this info. Thanks!Nowhither
In my case, the 'valid architectures' did not create trouble even though they were i386, armv6, armv7. But the architectures under 'Additional SDKs' needed to be changed to 'Standard(armv7,armv7s)'. Thanks for the suggestion.Shillyshally
P
9

You included src/Framework/Resources/Info.plist when added Facebook SDK files to your project. Just remove it from your project and everything will work again. Guaranteed! :)

Prynne answered 26/2, 2013 at 9:12 Comment(1)
Yes, this works. You might be also getting "SBTarget is invalid" error. I just unchecked the "Info.plist" from the "Target Membership" and it worked. Thanks a lot.Patrilineage
T
6

I have solve the problem using the below steps.

  1. Close the Xcode
  2. Delete the application from device
  3. Restart the device
  4. then re-run the application

it is working fine..

Tyika answered 7/12, 2012 at 13:50 Comment(0)
B
3

Make sure the bundle name (in plist file) is same as the project name. I changed it and it worked.

Blackfellow answered 16/9, 2013 at 14:48 Comment(0)
A
2

One of my 3rd party libraries couldn't run on armv7s so I removed that option. I also removed armv6 and kept armv7 as the only option. It built and ran on the phone with only armv7.

Arbitrage answered 20/10, 2012 at 1:56 Comment(0)
M
1

I have solve the problem using the below steps.

Close the Xcode Delete the application from device Restart the device then re-run the application it working fine..

Maurist answered 5/3, 2013 at 12:41 Comment(0)
O
1

I faced this problem because Build settings-> Complier for C/C++/Objective c was set wrong.

So I changed it to default compiler available, it worked!

Outrageous answered 4/12, 2013 at 4:55 Comment(0)
A
1

Just need to select the compiler LLVM in

Targets --> Build Settings --> Build Options

We just need to change the unsupported compiler to the default compiler :)

Anselmo answered 14/2, 2014 at 7:37 Comment(0)
T
1

I ran into the same problem. When I check the compiler it is showing incompatible compiler. you need to make it valid one. To set valid compiler follow the steps

select your

project----> build settings-->

on the search bar type compiler and search now you can find build options under build options you will find compiler for c/c++/objective c set it to valid one.enter image description here

Titration answered 14/5, 2014 at 11:12 Comment(0)
N
0

So basically I created a new project, copied all the sources and everything seems to work fine. At least the app runs.

I am not sure which setting was causing the problem.

Nowhither answered 22/9, 2012 at 5:10 Comment(0)
C
0

I had an issue with an out of data library that was built for iOS 4.x and I was building a new app for iOS 6 with iPhone 5 support. I received this error and the only way I resolved it was to make armv7 the only architecture and valid architecture listed in my project and target build settings.

Cristiecristin answered 22/11, 2012 at 0:19 Comment(0)
A
0

remove info.plist refrence. And then re-drag info.plist to proj but don't copy to "target"

Alsup answered 4/7, 2013 at 6:36 Comment(0)
V
0

You just goto Build setting Then valid architecture Replace armv7 armv7s instead of armv7 .Then it will work fine .

Vert answered 5/8, 2013 at 10:32 Comment(0)
S
0

Ok, not sure if this is the Problem in Your Project. But what fixed it for me, was to change the Name of the Info.plist File.

  1. I changed the name from Info.plist to my-project-info.plist
  2. also change it under target-build-settings/Packaging/Info.plist
  3. Than delete the App from Devices/Simulators and re-run the App through Xcode

In my Case, everything worked fine since than. In my Case there was nothing wrong with the specifications made in the plist file or with the valid architectures.

Sundog answered 5/9, 2013 at 15:57 Comment(0)
A
0

some times this happens when your project was build in xcode 4.5 and you are trying to run in xcode 5.0. so in my case I found the solution.

Change your compiler for C/C++/ObjectiveC Go to Build

Settings->Build OPtions->compiler for C/C++/ObjectiveC; select Default(Apple LLVM5.0)

Acclimate answered 13/12, 2013 at 5:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.