333

It's been a while since I've had to adjust project build settings. After upgrading to a recent SDK I'm having trouble building my ad hoc distribution configuration.

Build generates this warning and error:

warning: iPhone apps should include an armv6 architecture (current ARCHS = "armv7")

iPhone/iPod Touch: application executable is missing a required architecture. At least one of the following architecture(s) must be present: armv6 (-19033)

However in my project I thought I had things set correctly:

  • Architectures is: Standard (armv6 armv7)
  • Base SDK: Latest iOS (currently set to iOS 4.2)
  • Valid Architectures: armv6 armv7

alt text

I have cleaned all targets.

I appreciate any tips.

James Webster
  • 31,873
  • 11
  • 70
  • 114
Nick
  • 8,483
  • 10
  • 46
  • 65
  • Mine was an old app that got an update, and it throws the same error for iOS Deployment Target < 4.3 as well! So my solution was to remove all references to armv6 and set this to >=4.3. It worked. – Henrik Erlandsson Apr 23 '13 at 13:22
  • And just now I tried the same for another old app that got a rehaul and it didn't work... XCode 5 issue, it misreads the Build Settings, it seems. – Henrik Erlandsson May 30 '14 at 13:57

17 Answers17

419

If using Xcode 4.2 or higher, try the following:

  1. Click your Project name (in the left column), followed by the Target:

    enter image description here

  2. Click the 'Build Settings' tab (in the right column):

    enter image description here

  3. Click the 'Release' or 'Distribution' row under 'Architectures', and choose 'Other...':

    enter image description here

  4. Double click the highlighted row named '$(ARCHS_STANDARD_32_BIT)' in the popover that appears, and replace it by typing 'armv6'. Then add a new row with the plus button in the bottom left of the popover, and type 'armv7', then click Done:

    enter image description here

Update: you should add armv7s to target the iPhone 5 as well. (And drop armv6 if building with Xcode 4.5 or higher, which no longer supports armv6.)

That's it. You should now be able to build/archive without generating errors.

If it still doesn't work, see this answer from justinxreese, which suggests adding entries for armv6 and armv7 under "Required Device Capabilities" in your info.plist file.

Community
  • 1
  • 1
Nick
  • 8,480
  • 3
  • 37
  • 33
  • 3
    Yep, looks like Apple are moving away from ARM6, so this seems to be a necessary step for Xcode 4.2. It's strange that the submission process still requires an ARM6 build, even though 4.2 is now public... – Jasarien Oct 14 '11 at 09:59
  • 7
    I dont have distribution row under architecture, instead i have "Release" row. don't know how to do it – OMGPOP Oct 15 '11 at 04:40
  • 2
    @Let'sSpotIt Just add armv6 and armv7 to your Release row. The project in my screenshots was imported from an earlier version of Xcode, hence the different Architecture names. – Nick Oct 16 '11 at 16:13
  • 2
    Thanks Nick. Also, new projects created in Xcode 4.2 may need to have their info.plist file changed to support armv6 devices. See my additional answer below. – MattyG Oct 17 '11 at 04:30
  • To get this to work, I had to remove the previous entry, $(ARCHS_STANDARD_32_BIT), so that just armv6 and armv7 were present. – dnstevenson Oct 18 '11 at 01:32
  • @dnstevenson That's exactly what I meant by "Double click the highlighted row in the popover that appears, and type 'armv6'". (The finished state is also shown in the screenshot.) I've edited my answer to clarify things, though. Sorry if it wasn't clear. – Nick Oct 18 '11 at 08:15
  • Figured I'd add that in my case, removing the previous entry did not work; simply adding "armv6" did the trick, resulting in the Architecture section saying: "armv6 $(ARCHS_STANDARD_32_BIT)" – brack Oct 18 '11 at 22:34
  • Arrrgh - I wish this worked for me! I followed these instructions/caveats to the letter but I ultimately get clang exiting with an error code of 1 but no explanation why. I guess I need to use LLVM GCC 4.2 instead ... [tries it] ... yep, that did it! – Joe D'Andrea Nov 16 '11 at 21:14
  • Pity Apple just cannot care enough about their developers to allow them to upgrade their dev environment with all this kind of hidden magic spells. They could at least have a standard tip for each common issue, but that's too much work, apparently. I'm wearing the big fat weary :/ of a tired cynic on my face right now. – Henrik Erlandsson Nov 18 '11 at 10:34
  • I never assumed that just adding an architecture will solve it but it does ;) – Yogi Dec 21 '11 at 10:45
  • This solved my issue with the app uploader during my App Store update submission. It was failing right away after choosing the compressed package file. Thanks. – Ari Braginsky Dec 22 '11 at 01:34
  • Also removing the armv7 from the info.plist and with this it's all fixed :) – Designer023 Jan 24 '12 at 21:36
  • What is "PutThingsOff?" Some sort of procrastination app? – gonzobrains Mar 16 '12 at 03:03
  • 1
    @Nick thanks for the tip, and for me i had to select the "Project" instead of "Target". selecting from the "Target" build settings didn't work for me. anyway thanks again for the help. – Prasad De Zoysa May 14 '12 at 08:29
  • Nick, why not highlight "(And drop armv6 if building with Xcode 4.5 or higher, which no longer supports armv6.)" with huge letters in bold and put it before the tip for the now old XCode versions? It's quite missable where it is, and it's the correct answer today. :) – Henrik Erlandsson Apr 23 '13 at 13:09
  • Huh. I wrote that before I tried it. Removing armv6, clean, archive gives the same error. – Henrik Erlandsson Apr 23 '13 at 13:11
  • Mine was an old app that got an update, and it throws the same error for iOS Deployment Target < 4.3 as well! So my solution was to remove all references to armv6 and set this to >=4.3. It worked. – Henrik Erlandsson Apr 23 '13 at 13:21
62

If you uncheck "Build Active Architecture Only", then it will build all the valid architectures.

Update: This is no longer applicable as of Xcode 4 - follow Nick's instructions for Xcode 4 and later.

Brian
  • 15,599
  • 4
  • 46
  • 63
59

I had this problem even after following the accepted answer and found the following to work:

In your Info.plist, add an entry for Required Device Capabilities. This should be an array and will have two entries.

  • Item 0 : armv6
  • Item 1 : armv7

It will look like this:

Required device capabilities entry

justinxreese
  • 1,896
  • 1
  • 18
  • 26
  • This solution fixed my other architecture warnings, but I still get the initial one, and I also have "Build Active Architecture Only" set to "No" – Dan F Jul 27 '11 at 19:44
  • fixed it for me, as the previous solution didn't apply. For some reason armv6 does't show under my build architecture settings anymore :S – seeafish Aug 20 '11 at 16:16
  • This along with nick's answer above fixed it for me. +1 – Saurabh Wadhwa Nov 26 '11 at 15:51
  • You should remove this option at all in the newest xCode versions, then it will compile. When you put both then it will require both arcitectures to be valid in your device which is practically impossible – Artem Mar 01 '12 at 09:30
  • For building with XCode 4.5+, you will have to drop armv6 from required device capabilities. – Pulkit Goyal Nov 06 '12 at 20:16
26

In addition to Nick's answer about Xcode 4.2, you may also need to review your info.plist file. It seems as if new projects started in Xcode 4.2 by default specify 'armv7' in the 'Required Device Capabilities'. You'll need to remove this if wanting to support devices that run armv6 (e.g. the iPhone 3G).

enter image description here

Delete armv7 from the 'Required device capabilities' in yourProjectName-Info.plist

MattyG
  • 8,449
  • 6
  • 44
  • 48
21

An ios 6 update

Changes in Xcode 4.5.x for ios 6

  1. Xcode 4.5.x (and later) does not support generating armv6 binaries.
  2. Now includes iPhone 5/armv7s support.
  3. The minimum supported deployment target with Xcode 4.5.x or later is iOS 4.3.
Animesh
  • 1,020
  • 9
  • 8
6

I had this problem too. I just set my deployment target to 4.3 and left only armv7 architecture and it worked. At point almost everyone has 5, so 4.3 is fine.

Tom Kincaid
  • 4,887
  • 6
  • 47
  • 72
3

for me it not work with every answer. but I try TARGETS > Architectures > Debug and add a new row with the plus button, and type 'armv6'(with out '), then click Done.

and finally CMD+B and then right click at PrjectName.app(in Products folder) > Open in Finder > Compress "PROJECT_NAME.APP" (in Debug-iphoneos) > Upload to AppStore

enter image description here

it's my screen setting. enter image description here

if you have include project please config it all. Hope your help.

mr.octobor
  • 191
  • 2
  • 4
  • 18
  • 1
    I additionally had to set armv6 on the Release Architecture before it would work. – mph Apr 05 '12 at 05:24
3

After trying a mixture of these answers, I finally stumbled across making it work. Im so pissed off at Apple right now. Just another hour they made me waste. Here is my config.

enter image description here

Louie
  • 5,920
  • 5
  • 31
  • 45
2

Wow, I update/submit apps about every 6 months. Every time I do this I have to learn the "new" way to do it...

Same problems as described above when running iOS 5.1, and Xcode 4.3.2

Thanks for the posts! I spent a while updating all of the project settings to armv6, armv7, but no joy. When I set "build active architecture only" to No I got a build error about putting both objects in the same directory.

Fortunately, I noticed you guys were modifying the target build settings instead. This is what finally worked (armv6, armv7, and setting "build active architecture only" to No under the Target build Settings). As a disclaimer, I had already set all of the architectures to armv6, armv7 in the project settings too.

Anyway, thanks for the help, Brent

Brent
  • 21
  • 1
2

I had to be sure to change these settings in both the Target and Project settings on xCode 4.3.2 after doing that and setting it to build for both armv6 and armv7 everywhere I was able to submit my app.

For safe measure I also exited xCode between making the changes and doing a clean, build, archive cycle.

pwbrewer
  • 21
  • 1
2

I tried all the answers above ,none resolved my question. So I create a new project and diff the build settings one by one. Only "Alternate Permissions Files" is different. The project build failed has a value armv7. Delete it then clean->build->archive . Succeed! Hope can solve you question

mbo
  • 164
  • 8
0

Quite a painful problem for me too. Just spent about an hour trying to build and re-build - no joy. In the end I had to do this:

  1. Upgrade the base SDK to the latest ( in my case iOS 5 )
  2. Restart xCode
  3. Clean & Build
  4. It worked!

I guess it's a bunch of jargon about arm6 , arm7 as it looked like my project was valid for both, at least the settings seemed to say so ) , my guess is this is a cynical way to bamboozle us with the technicalities, which we don't understand, so we just take the easy option and target the latest iOS ( good for Apple with more people being up-to-date ) ....

dijipiji
  • 3,063
  • 1
  • 26
  • 21
0

Here is Apple's documentation:

Technical Q&A QA1760

It says there are two things that you must get right:

  1. Add armv6 to the Architecture build settings
  2. Set Build Active Architecture Only to No.

If this still doesn't help you, double check that you are really changing the architecture build settings for the right build configuration – I wasted half an hour fiddling with the wrong one and wondering why it didn't work...

Select Edit Scheme... in the Product menu, click the "Archive" scheme in the left list and check the Build Configuration. Change the value if it was not what you expected.

Rolf Staflin
  • 2,092
  • 2
  • 22
  • 19
0

Try changing your deployment target to something higher than an armv6 processor. The settings for xCode are referencing the operating system level, for instance: iOS version#{3.1, 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 5.1}

(i)You can set this in the build settings tab or the summary tab. Start at the top left of the window in the Project Navigator, with all the files listed in it. Click the top-most one which has a blue icon.

(ii)If you are planning on using the programmable shader line circuitry, which is accessed and controlled through openGL ES 2.0 API, then you should set your "Deployment Version" to about 4.3, which I believe is only available on devices such as the 3GS or newer. xCode is reporting that iOS 4.2.5 or higher is needed run armv7 code. And once again, this processor, I believe, started with the 3GS.* iOS 4.3 seems to be the choice for me, for now.

http://theiphonewiki.com/wiki/index.php?title=Armv7

http://en.wikipedia.org/wiki/List_of_iOS_devices

zachjs
  • 1,738
  • 1
  • 11
  • 22
0

Note; I had to perform these steps for both my base project, and the embedded PhoneGap .xcodeproj file in my application.

Yes, I embed PhoneGap; they update far to frequently, and I've got less than two months to know that a feature is depreciated.

James Perih
  • 1,360
  • 1
  • 17
  • 19
0

If xCode keep complaining about armv7, make sure you disconnect any connect device (especially iPhone 5!!) and try again. Took me hours to find out that little piece of information.

refaelio
  • 408
  • 5
  • 10
0

Using Xcode 4.2 on Snow Leopard, I used the following settings to build an app that worked on both armv6 (Iphone 3G and lower) AND armv7 (everything newer than 3G including 3GS).

architectures: armv6 and armv7 (removed $(ARCHS_STANDARD_32_BIT))
build active architecture only: no
required device capabilities: armv6

do not put armv7 in required device capabilities if you want the app to run on 3G and lower as well.

MAhipal Singh
  • 4,745
  • 1
  • 42
  • 57
noromamai
  • 31
  • 1
  • 3
  • 1
    it's the only thing that worked for me. testing on iphone4, iphone3g, ipad1, ipad2. read that i had to put armv6 AND armv7 in the required device capabilities, but as soon as i put in armv7, the app would not upload/run on the iphone3g – noromamai Feb 15 '12 at 10:28
  • Leaving the armv7 entry in "Required device capabilites" made Xcode forbid me from running on iPhone 3G. – tinsukE Feb 28 '12 at 19:15