3
votes

I'm trying to upload an .ipa file via Apple's Application Loader utility on my Mac. When I do, I get this error:

ERROR ITMS-90094: "Invalid Launch Image - Your app contains a launch image with a size modifier that is only supported for apps built with the iOS 6.0 SDK or later."

The app is built using the iOS 8.2 SDK in Embarcadero RAD Studio XE7 / C++ Builder. I have created a valid Adhoc Distribution mobile provision, which is on my Mac and used by PAServer 15.0 & Xcode 6.2 to compile the app. I have properly defined that in my Project Properties | Provisioning for Adhoc distribution on the iOS platform. I have changed to Release mode, and under Configuration I choose Adhoc via the Project Manager. I clean the app first, then Build it, and then Deploy it. When I'm done, I get a valid .ipa file that runs perfect on my test devices.

According to Apple this issue occurs when you build your app with iOS SDK 5.1 or earlier, but include the [email protected] image (for iPhone 5's 4-inch retina display support). It says to resolve this issue build your app against the iOS 6.0 SDK or greater. But as I stated, I am using the iOS 8.2 SDK. I've also tried 8.1, and those are the only 2 iOS SDK versions I even have installed on my system.

It says if you do not intend to build your app against iOS 6 SDK, then remove the [email protected] from your project. I tried removing this file, and the error goes away but then you get another error: "iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5."

It must somehow be detecting the wrong version from the IPA file (which I can only assume is somehow an issue on the RAD Studio side of the equation, as opposed to Xcode or a ton of other people would be having this issue). Other posts use terms like "Deployment Target", "Base SDK" and "Target SDK".

I believe I have set all of these correctly, but how can I fix it so the IPA generated by XE7 is properly detected by Application Loader as being built with a later SDK than iOS 6.0?

Resolutions I've tried (without success):

Most of the search results say to build with a newer version of Xcode (at least 5 or later), but I'm using the latest Xcode version 6.2. Note: Everywhere it says ver 6.0, I also tried 7.0. Project Options refers to Target: All configurations - iOS Device platform.

  1. http://207.211.86.211/index.php/answers/my-discussion/upload-to-itunesconnect
    This guy had the same problem, and says to verify all your Project Options | Application images are the correct sizes. I've verified that mine are. He also recommends that you ensure you are building with release versions of Apple's iOS SDKs. Via Tools | Options | Environment Options | SDK Manager, select the iPhoneOS 8.x and click "Update Local File Cache". This also didn't help.

  2. https://pjstrnad.com/submitting-application-apple-store-delphi/
    First he recommends you create a custom Info.plist file under Project | Deployment. Then to fix the invalid image problem, he says you need to add the MinimumOSVersion key and set it 6.0.

    Add to Custom.info.plist:

    <key>MinimumOSVersion</key>
    <string>6.0</string>

  3. Since I can only post 2 links, this next one you will have to search at community.embarcadero.com under Answers for "Problems deploying for iOs 8.1" for the original post.

    Here they recommend you install Hotfix 30036 "Hotfix for Submitting iOS Applications to Apple AppStore" - which I did. They also suggested on Project Options | Delphi Compiler | Compiling, adding "--ios-version-min:6.0" to Additional options to pass to the compiler. Not sure if that would affect me since I'm using BCB, but I tried it too.

  4. An article on stackoverflow describes how to use otool and grep on the .IPA file to determine version info. So I unzipped my ipa file, ran otool w/ grep on it, which returned this output:

    cmd = LC_VERSION_MIN_IPHONEOS
    cmdsize = 16
    version = 7.0
    sdk = 7.1

    While it doesn't say 8.1 or 8.2 as I'd expect, both versions are 7+. This is definitely newer than 6.0, so there must be somewhere else Application Loader is getting the version from.

  5. Changed Project Options | C++ Linker: Advanced: Minimum iOS version supported to 6.0.

  6. Changed Project Options | Delphi Compiler | Linking: Minimum iOS version supported to 6.0.

  7. Tried creating a brand new blank Multi-Device Application, provisioning it and uploading it via Application Loader. This fails with the same exact error.

1
If it is a new app it has to be compiled with 64-bit compiler. Does that have something to do with your problem?Doug Rudd
I just got XE8 and compiled for iOS 64-bit & 32-bit as a Universal IPA. I still get the Invalid Launch Image error when uploading to TestFlight.Dann Daggett

1 Answers

0
votes

Answer:

Between Embarcadero support and error messages/docs from Apple I finally figured out what the problem was. It turns out Apple will allow you to try and submit an Ad hoc app to iTunes Connect, even though it must be an App Store mobile provision. Despite the fact that you are not distributing to the public App Store yet, but are deploying a private beta test version to a select group of users, you still submit it as an App Store provision. The difference is the beta entitlement that it has.

I took Ad hoc to mean it was going to a select number of devices outside of the App Store via TestFlight - but this is not the case (at least with TestFlight anyway). The problem stems from the fact that Apple's error message was completely useless. The error should have said something like "You must use an App Store provision, and not an Ad hoc or Development provision" instead of "You are including an invalid launch image for 6.0 SDK".

To make matters worse, when TestFlight was a 3rd-party service the instructions were to submit it as Ad hoc. So our team got confused, as that changed when Apple bought it (but this was not made obvious, or at least clear in any Embarcadero docs).

Also terminology is another issue. The terms CERTIFICATE and PROVISION sometimes seem to get used interchangeably or accidentally from one or the other - and the distinction is quite important.

So the solution is to use an App Store Mobile Provision (signed with a Distribution certificate) instead of an Ad hoc one. The app has been submitted successfully to iTunes Connect now.