Re: Universal binary with different deployment targets - how?
Re: Universal binary with different deployment targets - how?
- Subject: Re: Universal binary with different deployment targets - how?
- From: Greg Guerin <email@hidden>
- Date: Sat, 8 Aug 2009 11:34:14 -0700
Roni Music wrote:
So one slice is for the older arm6 processor and the other slice
for the newer
arm7 processor. My app doesn't require any OS 3 features and I
still want it to
run on OS 2 (in my case OS 2.2.1).
I'm using SDK 3, I set the "iPhone OS Deployment Target" to iPhone
OS 2.2.1
which then sets "MinimumOSVersion" in the Info.plist file to 2.2.1.
This way my app runs both on my older iPhone 3G with OS 2.2.1 using
the arm6
slice and on my newer iPhone 3GS with OS 3 using the arm7 slice.
My app does a lot of DSP processing and being able to compile for
the arm7
processor makes it a lot faster. The improvement is dramatic and the
app runs like a charm.
Now when finished and uploading it to the app store, I get an error
message
saying:
"The binary you uploaded was invalid. Fat binaries require a
MinimumOSVersion of
at least 3.0".
How can I set the arm7 slice to deployment target 3.0 and the arm6
slice to
deployment target 2.1.1?
The plain interpretation of the error messages strongly suggests you
can't.
Notice what it's saying: Fat binaries require OS 3.0. I take that to
mean fat binaries of any kind require OS 3.0. That means fat
binaries of any kind are prohibited (or not supported/allowed) on any
OS before 3.0, e.g. 2.2.1.
I'm not sure if this makes the application acceptable by the iPhone
AppStore, if
not, anyone knows how to do this? After all, the whole idea with
fat binaries is
to target different architectures and OS versions.
The question is: are fat binaries of any kind supported on any OS
before 3.0? If not, then you can't possible use them before 3.0.
Could the LSMinimumSystemVersionByArchitecture setting in the
Info.plist file be
a solution?
Try it and see what happens. Reading the reference doc, it does say
LSMinimumSystemVersionByArchitecture "specifies the earliest Mac OS X
version", which suggests it only applies to Mac OS X, not iPhone OS.
If nothing else works, you may have to code a runtime choice between
different code modules compiled for arm6 or arm7. In short, simulate
fat binaries manually by loading the appropriate module after the
main code determines the current runtime architecture.
All my responses above are based entirely on the error messages and
plain logical analysis of what they say. As such, my entire
conclusion could be wrong; I'm just going by the plain text of the
messages.
You might get a better response on the iphone forum if you asked a
simpler question, such as "Are fat binaries supported before OS
3.0?". That is, ask a simple file-format question rather than a "How
do I do this" question. Since mach-o fat binaries are a file-format
first and foremost, that question should be more easily answered.
You might also look in the list of new features for iPhone OS 3.0.
If it lists fat binaries as a new feature, it strongly suggests that
support for fat binaries of any kind is not present before 3.0.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden