AlvinfromDiaspar
AlvinfromDiaspar

Reputation: 6834

(XCode 4.0.2) Archive build (build for distribution on app-store) armv6 warning

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:

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

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.

Upvotes: 2

Views: 5470

Answers (2)

brian.clear
brian.clear

Reputation: 5327

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.

Upvotes: 0

Kazuki Sakamoto
Kazuki Sakamoto

Reputation: 14009

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

Upvotes: 5

Related Questions