2

I swear I am close to finally submitting an app with XCode 4.0.2. But i am afraid i've come across a pretty steep obstacle to hurdle now.

No matter what I do i always get 1-2 warnings related to the armv6 architecture. I have set both Project & Target build settings to use:

  • Architectures: Standard (armv6 armv7)
  • Base SDK: Latest iOS 4.3
  • Build active architectures only: checked or unchecked doesnt seem to make a difference)
  • Support platforms for Distribute: iphoneos
  • Valid architectures: armv6 armv7

Upon archiving (to distribute to app-store) I always get these warnings:

  • 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)

Please help.

* UPDATE *

Just read somewhere that the Base SDK needs to be set to iOS 4.0 instead of "Latest iOS (iOS 4.3)". It built/archived without warnings.

* UPDATED AGAIN *

Disregard my previous update comment. The thing that caused a clean archive build was the unchecking of the "Build active architectures only" option. Not sure why it decided to build fine now cuz this checkbox wasn't checked initially, but only after i started changing things in trying to fix the warning in the first place.

AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140
  • The option won't check itself. You normally build only for the active architecture when you're coding/debugging. When building for release/deployment you need to build for all relevant architectures. – Joshua Nozzi May 09 '11 at 19:16

2 Answers2

5

Make sure build settings in Xcode.

  • "Architectures" should be "Standard (armv6 armv7)"
  • "Build Active Architecture Only" should be "NO".
  • "Valid Architectures" should be "armv6 armv7".

It is able to check the archived application binary using file command.

$ file Payload/Foo.app/Foo
Payload/Foo.app/Foo: Mach-O universal binary with 2 architectures
Payload/Foo.app/Foo (for architecture armv6):   Mach-O executable arm
Payload/Foo.app/Foo (for architecture armv7):   Mach-O executable arm
Kazuki Sakamoto
  • 13,929
  • 2
  • 34
  • 96
0

I got the same error on an old app built with XCode 3 but had to rebuild a year later for XCode 4.

ALL THESE SETTINGS WERE THE SAME:

"Architectures" should be "Standard (armv6 armv7)"
"Build Active Architecture Only" should be "NO".
"Valid Architectures" should be "armv6 armv7".

I checked the archived application binary using file command.

$ file MyApp

DIDNT RETURN TWO ENTRIES

Payload/Foo.app/Foo: Mach-O universal binary with 2 architectures
Payload/Foo.app/Foo (for architecture armv6):   Mach-O executable arm
Payload/Foo.app/Foo (for architecture armv7):   Mach-O executable arm

BUT ONE

$ file MyApp
MyApp: Mach-O executable arm

I saw 'universal binary' in above stackoverflow so realised the app had never been built for iPad.

I had to change iPhone to Universal.

Project > My App Target > Summary Tab > Devices drop down
Change from iPhone to Universal.

It will as to copy MainWindow to MainWindow-iPad.

I didnt plan to make iPad version yet so said no.

I did Archive again and Validate App worked.

brian.clear
  • 5,277
  • 2
  • 41
  • 62