Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Good to know: iOS 4, 5, 6 and invalid binary

Discussion in 'iOS and tvOS' started by CH, Oct 6, 2012.

  1. CH

    CH

    Joined:
    Jul 4, 2012
    Posts:
    109
    Recently we came across the following issue...it might save you some time trying to solve Xcode issues that aren't the problem.

    We're targeting our app for iOS 4.3, but if you do that, you might get the error "invalid binary" when uploading a Unity3d 3.5.6 project (there is no specification however so you might end up trying to upload your binary for hours and solving problems that aren't the issue). Apparently, the reason for this is that the iPhone 5 default screen (that prevents the iPhone 5 from 'letterboxing' your app) may not be present in an app targeted below iOS 6. The basic splash default image created automatically by Unity (Default-568h@2x.png) shouldn't be present (we eventually got an email from Apple stating: "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.")

    So basically you have a choice: target above iOS 4.2 (4.3 or higher) and fully support the iPhone 5 (this might force you to update MacOS or even buy a new Mac if it's too old) or support older iOS versions but have a letterboxed app on iPhone 5 (and possibly some negative ratings because buyers of a new iPhone want to see all pixels on their screens illuminated). :-o
    Targeting 4.3 means that you drop support for iPhone3 and 3G (but not 3GS).

    Edit: Another solution here: http://stackoverflow.com/questions/12633831/how-to-target-ios-5-and-ios-6
     
    Last edited: Dec 4, 2012
  2. DanielFF

    DanielFF

    Joined:
    Aug 29, 2012
    Posts:
    38
    What resolution is "4" sized launch image" ?
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,510
    I'm confused, what XCode are you building with, and what iOS SDK?
     
  4. CH

    CH

    Joined:
    Jul 4, 2012
    Posts:
    109
    An explanation/correction:

    The iPhone5 image is automatically generated by Unity when you build with the latest version. Google if you still need the resolution.

    If you build your project with an older version of Xcode (3.2, 4.2) you'll get an error* when the file Default-568h@2x.png is present as you HAVE TO upgrade Xcode to the latest version in order to build against the latest SDK (6.x). The latest iOS target version supported when building with iOS SDK 6 is 4.3. This means you'll have to drop support for iPhone 3G and iPod Touch 2nd generation.

    * The point is: when building with an older version of Xcode (at least 3.2) the error message ("invalid binary") is only shown in iTunesconnect after submitting the binary. So if you're trying to upload but don't get why your binary keeps getting rejected: upgrade to Xcode 4.5.1 so you'll be able to submit for iPhone 5.
     
    Last edited: Oct 11, 2012
  5. DanielFF

    DanielFF

    Joined:
    Aug 29, 2012
    Posts:
    38
    Thank you!

    yes, that work with xcode 4.5.1
     
  6. Hakimo

    Hakimo

    Joined:
    Apr 29, 2010
    Posts:
    316
    Just a quick question, I'm building using Xcode 4.2. If i was to delete the "Default-568h@2x.png", what would happen? Will that effect the approval of the app in the store?
     
  7. CH

    CH

    Joined:
    Jul 4, 2012
    Posts:
    109
    Your app will not generate the error and could be approved by Apple. However, the app will run in letterbox mode on iPhone 5, which looks like this:
     
  8. kasulogamestudio

    kasulogamestudio

    Joined:
    Mar 22, 2012
    Posts:
    130
    This happened to us too, we took a few hours to get to this point, lol
     
  9. DavidS

    DavidS

    Joined:
    Aug 19, 2012
    Posts:
    30
    Hi,

    I got the same issue but I would like to use 5.1. So will the problem be solved if I delete in Player Settings the sprite in High Res. iPhone Tall and will it then cause any issues on the iPhone 5; or do I have to do anything else? Thanks!
     
  10. CH

    CH

    Joined:
    Jul 4, 2012
    Posts:
    109
    If you delete the iPhone 5 splash screen in Xcode you'll be fine. The iPhone 5 will run in letterbox mode though.
     
  11. StoneFish

    StoneFish

    Joined:
    Aug 26, 2012
    Posts:
    123
    I thought 3GS can now use armv7 though (with iOS 6.0) ??? So you can still support it. My game runs fine building only with ARMV7 onto the iPhone 3GS
     
  12. CH

    CH

    Joined:
    Jul 4, 2012
    Posts:
    109
    If I'm correctly informed, 3GS does support armv7. 3G and 3 don't.
    We dropped armv6 and our binary now is a lot smaller. Our app didn't run on pre-3GS devices anyway, so there were no issues with targeting 4.3 instead of 4.2.
     
  13. LukeTomes

    LukeTomes

    Joined:
    Mar 16, 2011
    Posts:
    13
    Thankyou our binary was being rejected with no reason given and after a quick google we found this thread... removed the image mentioned above and the binary was accepted.
     
  14. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    49
    This is why im always scared to update software without testing it on a separate machine first
     
  15. Maccyfin

    Maccyfin

    Joined:
    Aug 19, 2012
    Posts:
    49
    Hi all, I'm coming back to this thread as there's a new problem relating to the iphone 5 splash image. When submitting the game to apple I get the following invalid binary email:

    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.

    If I try to delete the image in XCode I get this message from apple:

    iPhone 5 Optimization Requirement - Your binary is not optimized for iPhone 5. New iPhone apps and app updates submitted targeting iOS 6 and above must support the 4-inch display on iPhone 5 and must include a launch image with the -568h size modifier immediately following the <basename> portion of the launch image's filename. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images. Learn more about iPhone 5 support and app launch images by reviewing the iOS Human Interface Guidelines and iOS App Programming Guide.

    My specs are:
    - Unity 3.5.7
    - Mac OS 10.6.8 (snow leopard)
    - Xcode 4.2 with the iOS 6.1 SDK
    - Target platform in unity: armv6 + armv7
    - Target iOS version: 4.3

    I originally deleted the 568h image from Xcode which seemed to work fine, but I've heard that apple requires this image to be in the bundle since May 1st 2013.
    Has anyone else seen this problem or figured out a way around it?

    Thanks for the help all
    Martin