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

喜你入骨 提交于 2020-01-15 07:04:54

问题


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.


回答1:


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



回答2:


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.



来源:https://stackoverflow.com/questions/5932532/xcode-4-0-2-archive-build-build-for-distribution-on-app-store-armv6-warning

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!