Sunday, May 27, 2012

Warning iPhone apps should include an armv6 architecture even with build config set


It's been awhile 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.



Appreciate any tips. Thanks!


Source: Tips4all

9 comments:

  1. If using Xcode 4.2 or higher, try the following:


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


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


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


    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:




    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.

    ReplyDelete
  2. 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.

    ReplyDelete
  3. 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:

    ReplyDelete
  4. 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).



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

    ReplyDelete
  5. 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



    it's my screen setting.


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

    ReplyDelete
  6. 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

    ReplyDelete
  7. 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.

    ReplyDelete
  8. 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.

    ReplyDelete
  9. 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:


    Upgrade the base SDK to the latest ( in my case iOS 5 )
    Restart xCode
    Clean & Build
    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 ) ....

    ReplyDelete