开发者

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

开发者 https://www.devze.com 2023-03-04 01:13 出处:网络
I swear I am close to finally s开发者_开发问答ubmitting an app with XCode 4.0.2. But i am afraid i\'ve come across a pretty steep obstacle to hurdle now.

I swear I am close to finally s开发者_开发问答ubmitting 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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消