XCode 4.5 (4G182) + iPhone 5 iOS6 - Choose a desti

2020-02-08 07:05发布

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.

17条回答
Emotional °昔
2楼-- · 2020-02-08 07:40

Also you need to select the compiler LLVM in

Project --> Build Settings --> Build Options

enter image description here

查看更多
放我归山
3楼-- · 2020-02-08 07:45

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

查看更多
够拽才男人
4楼-- · 2020-02-08 07:45

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)

查看更多
We Are One
5楼-- · 2020-02-08 07:48

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.

查看更多
该账号已被封号
6楼-- · 2020-02-08 07:49

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.

查看更多
姐就是有狂的资本
7楼-- · 2020-02-08 07:50

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

Changing Valid Architectures

查看更多
登录 后发表回答