Support armv6 and armv7 in the same ipa
Asked Answered
O

2

5

I have an XCode project configured like this:

  • Project Format: XCode 3.1-compatible
  • Architectures : Standard (armv6 armv7)
  • Base SDK : Latest iOS (currently set to iOS 4.2)
  • Build Active Architecture Only : UNCHECKED
  • Valid Architecures: armv6 armv7

My question: Does the resulting binary (.ipa) have 2 executables in it - one for each architecture, or just some different object files for each architecture or is the split even finer grained than that?

Just curious. Thanks.

Overscrupulous answered 20/4, 2011 at 22:12 Comment(0)
S
10

From what you described, the ipa should have a multi-architecture binary with both arm6 and arm7. You can check it with the file command in terminal. Inside of your app bundle is a executable that will have the same name as the app, myApp.app/myApp. Entering:

file myApp.app/myApp

in terminal will then print what it contains for you to double check. It should list the 2 architectures.

Sciomancy answered 21/4, 2011 at 0:1 Comment(0)
S
5

It will produce two binaries and then stick them together in a so-called "fat binary". You can play around with sticking multiple architectures in the same executable yourself using the lipo command.

To clarify: You will have two executables inside a single file. This is logically a single executable (both are your app), but one version targets one architecture and the other version targets the other architecture.

Swashbuckling answered 21/4, 2011 at 0:18 Comment(1)
There must be some overlap or re-use, because a single arch binary is 2.2MB, and a double arch binary is 2.7MB, not a trivial difference, but also not double.Overscrupulous

© 2022 - 2024 — McMap. All rights reserved.