Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

ERROR ITMS-90096: "Your binary is not optimized for iPhone 5" - Never seen this msg before
Started by troylyndon Apr 20 2017 01:04 AM

26 replies to this topic

Best Answer ingemar_cl , 01 May 2017 - 07:19 PM

@troylyndon

 

In the Launchscreen Xcode project you can change the Content Mode of the Launch image from "Aspect Fit" to "Aspect Fill".  The launch image is found in ViewControllerScene->ViewController->Launch and and Content Mode is found in the Attributes Inspector within the Utilities panel on the left (4th icon from the left, looks like a small slider).

 

With "Aspect Fill", keep in mind that you should not have any objects near the edges of your image as on some devices the image will zoom in to fill the black areas. In your case, for phones, the top and bottom parts of the image will bleed off-screen, so be careful not to have any objects close to the top/bottom of your image. On tablets the left/right parts of the image will bleed off screen, so you should keep and eye on that too.

 

You can see the result of what your images will look like on different devices directly within Xcode without having to install on device.

There is a "View as:" area on the bottom-left of the work area. Click on it to reveal a device/orientation selection list. From there you can select different devices/orientations to view how the launch image will look on that particular device.

 

Having thought about it some more, it may be better for you to design your images in a 16:9 ratio instead of the rather outdated 3:2 ratio as most phones nowadays have a 16:9 ratio. You should still change the Content Mode to "Aspect Fill" to avoid black bars though, and pay attention not to have objects near the edges just in case the edges bleed off screen.

[TOPIC CONTROLS]
Page 1 of 2 1 2
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

Never seen it before - I've been building my apps for more than 2 years without this error which comes up in application loader when I attempt to upload my IPA file to iTunesConnect.

When checking my code, I have these entries - I've only included landscape because my app requires landscape mode. Has something changed? What should I do?

                {  -- iPhone 5 LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape-568h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{320, 568}"
                },
                {  -- iPhone 5 LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape-568h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{320, 568}"


[TOPIC: post.html]
#2

Sphere Game Studios

[GLOBAL: userInfoPane.html]
Sphere Game Studios
  • Corona Geek

  • 1,254 posts
  • Corona SDK

Try including the portrait version - Default-568h@2x.png - as that is what they are checking for.



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

Apple has started checking more aggressively on launch images. My recommendation, if you've updated to a daily build that drops iOS 6 and 7 support is to switch to the Storyboard based launch image setup.

 

https://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

 

You end up with a total of four files in your project and one line of code in build.settings as opposed to dozens of launch images that have to be exactly right and an ugly, has to be exactly right table in your build.settings.

 

Apple enabled this system with iOS 8, so if you're building with an older build that still supports iOS 6 and 7, you would need to state with the UILaunchImages table and the static files.s

 

Rob



[TOPIC: post.html]
#4

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob, thank you. 1) will the Storyboard based launch image setup work for Android, too?

2) would the new image file be LaunchScreen.png?

3) What resolution would it be?



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

Android has no concept of Launch images. The showing of "Default.png" was something we added to the Corona startup process a long time ago because Android users wanted it. It realistically was the pre-cursor to the Splash screen control that we have today. We never kept Android up to date to support modern devices. 

 

The start up sequence is something like this:

 

iOS:    iOS Controlled Launch Image -> Corona Splash Screen -> Your first frame

Android:                                Corona Splash Screen -> Your first frame                                     

This disucssion about storyboard is purely a Apple replacement for the iOS Controlled Launch Image

Rob



[TOPIC: post.html]
#6

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob, thank you, again. Please forgive my ignorance.

 

I asked, 1) will the Storyboard based launch image setup work for Android, too?

Was your response an explaination that the term storyboard was NOT in relation to the Storyboard system in Corona?

 

I asked, 2) would the new image file be LaunchScreen.png?

Was your response to say that a single Default.png file is all that is necessary?

 

I asked, 3) What resolution would it be?
Because your answer omitted any reference to resolution, is it resolution independent? So a high-res image is best for all platforms?



[TOPIC: post.html]
#7

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob, my apps manage resolution differences, rather than use Corona's features - does that matter?



[TOPIC: post.html]
#8

Sphere Game Studios

[GLOBAL: userInfoPane.html]
Sphere Game Studios
  • Corona Geek

  • 1,254 posts
  • Corona SDK

Ideally, do what Rob said and follow the instructions in the link he provided or add Default-568h@2x.png to your build.



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

I thought I did answer the questions.

 

1. No, Android does not use UILaunchImages, Default.png's or anything else. The only reason a Default.png was used in the past was because we had Corona build it in. This is replaced by the Splash screen control now.

 

1a. Storyboard in this context is an Xcode thing and is 100% unrelated to our old storyboard.* API's.

 

2. For Android, there is no standard file name that will be loaded because Android doesn't use them. If you're using a build of Corona that pre-dates the splash screen, then Android will pick up a Default.png and Default@2x.png for you, but that's Corona doing it, not the operating system. Post splash screen, if you want a splash screen on Android, you use the splash screen control plugin. 

 

3. Apple manages the launch image from the operating system. Corona has no control over this and cannot affect it in any way.  Storyboard launch images use a UIImageView and will stretch the image to fit the box when you add it in Xcode's Storyboard. You should provide three images:  1x, 2x, an 3x. We recommend using a 512x512, 1024x1024 and 1536x1536 sized images, but Apple doesn't care. By keeping it square and have it work on the background color you set in Xcode's storyboard, it will work for both landscape and portrait apps. 

 

Rob



[TOPIC: post.html]
#10

Sphere Game Studios

[GLOBAL: userInfoPane.html]
Sphere Game Studios
  • Corona Geek

  • 1,254 posts
  • Corona SDK

With regard to Xcode's storyboard I use a 1x1, 2x2 and 3x3 black png and use the splash screen plug in to display my logo.  

 

This way there is no difference between Android and iOS when my app loads and keeps things simple and memory efficient.



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

We were pondering do that for our sample apps, but what we opted to do there was just make the storyboard background black and leave out the UIImageView so we don't even need the three small images. It's a bit cleaner.

 

Rob



[TOPIC: post.html]
#12

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob, thank you. Can you point me to a sample, so that I can see precisely how to properly define and name the 3 filenames? I realize this is an item that once figured out, it's smooth sailing thereafter. But I would appreciate any further help.



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

In the guide I linked to above, it gives you a path to find a blank LaunchScreen.storyboardc file that you can copy to your project. It needs no images at all. Just copy it into place, add the one line to build.settings and take out the UILaunchImage table. You probably want to remove all of your Default*.png files.

 

Now if you do want to show something with the Storyboard launch image setup, follow this tutorial to build a custom one:
 

https://docs.coronalabs.com/guide/distribution/launchFile/index.html

 

At that point you are deciding the names you want to use. I believe if you just download the project, and export the LaunchScreen.storyboardc file without making any changes, then it will look for Launch.png, Launch@2x.png and Launch3x.png.

 

Rob



[TOPIC: post.html]
#14

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob,
I cannot easily make this change, because my Splash image (which I'm already using) is the same as my Launch Images with more details on it. I'm actually already using the Splash screen plugin, but the issue isn't that - its that the Application Loader prevents me from uploading my IPA file when it worked fine previously. The issue is related to an iPhone 5 image as stated in the error message:

ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone apps and
app updates submitted must support the 4-inch display on iPhone 5 and must include
a launch image referenced in the Info.plist under UILaunchImages with a
UILaunchImageSize value set to {320, 568}. 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' at
https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen."

So, I need to understand how to solve this problem exactly as explained at the top of this thread.

 

I have already added a Default-Landscape-568h@3x.png file. But in so doing, do I need to modify the iPhone launch images settings in my build.settings file, to change it from what it is now (as below)?

                {  -- iPhone 5 LandscapeLeft
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape-568h",
                    ["UILaunchImageOrientation"] = "LandscapeLeft",
                    ["UILaunchImageSize"] = "{320, 568, }"
                },
                {  -- iPhone 5 LandscapeRight
                    ["UILaunchImageMinimumOSVersion"] = "7.0",
                    ["UILaunchImageName"] = "Default-Landscape-568h",
                    ["UILaunchImageOrientation"] = "LandscapeRight",
                    ["UILaunchImageSize"] = "{320, 568}"


[TOPIC: post.html]
#15

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob,
By the way, looking at the Static Method section of this Corona doc, seems to need to be updated if there is a 3rd image now required:

https://docs.coronalabs.com/guide/distribution/launchFile/index.html



[TOPIC: post.html]
#16

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@Rob, I got the LaunchScreen.storyboardc to work, but there are two things you should consider making more clear in the online document at https://docs.coronalabs.com/guide/distribution/buildSettings/index.html#launchimage

 

1) It might be worth mentioning that the sample project is an XCode project and the storyboard file is NOT included in the zip file list. You MUST launch XCode and do the EXPORT. Perhaps this should be obvious, but I'd still recommend making it more clear, especially for those of us who really never use XCode for anything - I used to use XCode to see console messages via 'devices', but now I've found using the Applications -> Utilities -> Console.app much easier, so really, I never have to use XCode - and isn't that one benefit of Corona (non-Enterprise)?

 

2) Also, another important worthwhile point is to know that when you export from XCode, you need to export the 'package', not just the storyboard. This will result in the proper filename "LaunchScreen.storyboardc" - whereas the 'c' at the end is missing if you don't export the 'package'.

 

3) It may also be worth mentioning that after putting "UILaunchStoryboardName = "LaunchScreen"," in build.settings in the iPhone - plist section, that we can either remove or block-comment out the uilaunchimages section using --[[ and --]]

 

If these two points were more clear in the docs, I wouldn't have had to bother you so much. So, please accept my apologies. Hopefully this feedback will be helpful.

 

I love Corona and the amazing technical support work your team is doing. Seriously. With the new version of Play The Bible Ultimate Verses due out by the end of April, many have told me it is the most sophisticated Corona-based game they've seen. If there are any features I've implemented that you feel may be of benefit to the community, just let me know and I'll do my best to keep contributing to this amazing, thriving community of developers.



[TOPIC: post.html]
#17

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 21,575 posts
  • Corona Staff

I'll pass the notes on.

 

Rob



[TOPIC: post.html]
#18

Sphere Game Studios

[GLOBAL: userInfoPane.html]
Sphere Game Studios
  • Corona Geek

  • 1,254 posts
  • Corona SDK

"many have told me it is the most sophisticated Corona-based game they've seen" - Now there is a sweeping statement ;)



[TOPIC: post.html]
#19

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@SphereGameStudios, yes, perhaps. Sophisticated simply means the number of features implemented. I'd prefer to hear "best game play" or something as such. The point is, however, that Corona is a fantastic platform that allows us to create sophisticated apps thanks to a solid core and expansive plugin library.



[TOPIC: post.html]
#20

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

Well, I thought this problem was solved, but now I'm getting this message on my iOS device:

Fatal error generating launch image for com.playthebible.rdgames: Error Domain=UILaunchStoryboardErrorDomain Code=2 "Error loading: There doesn't seem to be a valid compiled storyboard at path '/var/containers/Bundle/Application/3262625D-D584-4F35-A009-CFA32113C199/PlayBible.app/LaunchScreen.storyboardc'" UserInfo={NSLocalizedDescription=Error loading: There doesn't seem to be a valid compiled storyboard at path '/var/containers/Bundle/Application/3262625D-D584-4F35-A009-CFA32113C199/PlayBible.app/LaunchScreen.storyboardc', UILaunchStoryboardClientBundleIdentifier=com.playthebible.rdgames}

 

Any idea what's wrong?



[TOPIC: post.html]
#21

ingemar_cl

[GLOBAL: userInfoPane.html]
ingemar_cl
  • Contributor

  • 613 posts
  • Corona Staff

@troylyndon
It looks like you renamed a '.storyboard' file to 'storyboardc'. When you export the Launchscreen you must change the File Type to Interface Builder Storyboard Package. (See Step 9 under Xcode Configuration here)
If you forget this step, the exported file will be of type '.storyboard' instead of '.storyboardc'.



[TOPIC: post.html]
#22

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

Okay, one problem remains. Although I can see my launch images, it seems no matter how I attempt to rotate our logo on the launch screen images, it always appears in portrait mode - so with our game working only in landscape mode, is there some setting that must be changed for a landscape mode launch screen, since rotating the images 90 degrees doesn't appear to work?

 

The launch code seems to detect the rotation of the image and always set it to portrait. This is very strange.



[TOPIC: post.html]
#23

ingemar_cl

[GLOBAL: userInfoPane.html]
ingemar_cl
  • Contributor

  • 613 posts
  • Corona Staff

@troylyndon

If you design your png files in landscape orientation (example @1x=480x320, @2x=960x640, @3x=1440x960) it should work.

 

Keep in mind that iOS is a bit nasty when you switch launch screens as the system caches the old launch screen. 

Any change to the launch screen will not show up just by deleting the app and reinstalling a new one.

 

The only way to empty the system cached launch screen is to delete the app and reboot the device. After rebooting you can install the app with the new launch screen.



[TOPIC: post.html]
#24

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 346 posts
  • Corona SDK

@ingemar_cl

1) your suggestion worked exactly. However, on my iPhone 7, the width of the Launchscreen images doesn't reach the edges, and so there is black on the left and right. Do you happen to know if I can extend the width of the Launchscreen images without breaking it?

2) perhaps the best advice you provided was the note that the iOS is, as you put it, a bit nasty by caching the launch images, so I couldn't see the changes I was making. Thanks a lot for that great insight!



[TOPIC: post.html]
#25

ingemar_cl

[GLOBAL: userInfoPane.html]
ingemar_cl
  • Contributor

  • 613 posts
  • Corona Staff

  Best Answer

@troylyndon

 

In the Launchscreen Xcode project you can change the Content Mode of the Launch image from "Aspect Fit" to "Aspect Fill".  The launch image is found in ViewControllerScene->ViewController->Launch and and Content Mode is found in the Attributes Inspector within the Utilities panel on the left (4th icon from the left, looks like a small slider).

 

With "Aspect Fill", keep in mind that you should not have any objects near the edges of your image as on some devices the image will zoom in to fill the black areas. In your case, for phones, the top and bottom parts of the image will bleed off-screen, so be careful not to have any objects close to the top/bottom of your image. On tablets the left/right parts of the image will bleed off screen, so you should keep and eye on that too.

 

You can see the result of what your images will look like on different devices directly within Xcode without having to install on device.

There is a "View as:" area on the bottom-left of the work area. Click on it to reveal a device/orientation selection list. From there you can select different devices/orientations to view how the launch image will look on that particular device.

 

Having thought about it some more, it may be better for you to design your images in a 16:9 ratio instead of the rather outdated 3:2 ratio as most phones nowadays have a 16:9 ratio. You should still change the Content Mode to "Aspect Fill" to avoid black bars though, and pay attention not to have objects near the edges just in case the edges bleed off screen.




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]