Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Unity 5.2.0p1 iOS Launch Image - Wrong Size

Discussion in 'iOS and tvOS' started by ZDestructor, Sep 22, 2015.

  1. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    5.2.2p1 did not resolve the issue. I'll wait for this week's patch, but we have a deadline to meet and need to submit a build for review soon. If that means going back to 5.1 then so be it.
     
  2. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I fully understand, and this is why I'm getting annoyed as this is a show stopper issue for me and do not wish to release game that is ready and updates for other games unless this is resolved. More and more people upgrading to iOS9.1 who are using Apple devices and who can. It looks horrible for customer to see first thing issue with Launch/Splash screen (I think multiple issues here)

    I can confirm that 4.6.9 has a issue, you have confirmed 5.2.2p1 has issue.
    So are you sure that 5.1.4 these issues do no exist or you are speculating?

    In terms of patches there no one to contact to find out exactly when they be released, for last 3 weeks most have been delayed and out of sync. A patch calendar would be most ideal, cannot keep waiting in-definitely.
     
  3. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    We submitted an app with 5.1.2p3 and got it approved by Apple and our client so that one definitely works. I'm not sure about 5.1.4, but I'll check it out if we don't get a working patch this week.
     
  4. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    I'm seeing the incorrect rotation issue on iPhone 5 running iOS 9.1 with Unity 5.2.2f1. First 1-2 seconds of app load, the launch image is rotated 90 degrees and then it rotates correctly until first scene loads.

    Also tried the image = nil; hack, but it didn't fix my issue. Have rebooted device, always delete app from device before building, always replace project instead of append. Using Legacy Images (all slotted correctly), Launch Screen Type is set to None for both iPhone and iPad.

    Here's an image of what this looks like on my device:

    UnityLaunchScreenBug.png

    Note that I'm not seeing the rotation issue on iPad Mini (still testing other devices and simulator, will report back if I have any new info).
     
  5. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    The bug has been fixed; the fix will appear in the next patch release. As a work around you should remove UILaunchImages key from the Info.plist.
     
  6. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi Povilas, please see my feedback.

    The above fixed worked for 4.6.9x versions, iPhone and iPad
    On 5.2.2patch2, the fix does not work fully, iPads running iOS9.1 get the orientation issue. On iPhones the orientation issue goes away but then there is a image squashing. Therefore this not fully good. I tested on physical devices as I own many. Please double check the fix solves all issues.

    We happy to test..
     
  7. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Providing us SplashScreen.mm file would be ideal as waiting for patch for another week is not..
     
  8. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    Was the fix supposed to be in 5.2.2p2? I didn't see anything about it in the release notes so I assumed when he said "in the next patch release" he meant patch3.
     
  9. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I think it missed the patch2 release window, so fix not there.
     
  10. cocos2der

    cocos2der

    Joined:
    Jul 1, 2014
    Posts:
    8
    0OM@0M6TVBX2KYD75R24J$R.jpg
    U can close launch screen type. The launch screen file xib's UIImage error size
     
  11. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yes I have done this, I select both to none then manually edit images in Xcode, just trust me its a Unity issue and need this fix out..they really should test on all physical Apple devices, some things like this require manual QA-developer test and not some fancy automation qa script
     
  12. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    Here's what you get when using the iPhone/iPad launch screens. This is using purely .xib launch images as setup in Unity, I have Legacy Launch images disabled by choosing "don't use asset catalogs" in xcode.

    IMG_0247.jpg

    And here's my setup in Unity. If you leave out either the Portrait or Landscape image you end up with the same result as above except that one of the images will be a grey box.
    Screen Shot 2015-11-02 at 11.38.43 AM.png

    The Unity docs on this are incomplete and a confusing mishmash of iPhone/iPad Launch Screen and Legacy Launch Image descriptions and outdated images that make no logical sense. The engineers who actually worked on these systems need to look over the documentation and fix them. See here: http://docs.unity3d.com/Manual/class-PlayerSettingsiOS.html
     
    Meltdown and MrEsquire like this.
  13. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    Unity, any update on when 5.2.2p3 is going to drop with this fix? We're going on a week here waiting for this fix. Our game is currently featured on Apple TV and we were really hoping to get the iOS version updated while it's still getting some attention.
     
  14. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I understand your frustration, im pissed of to be honest... i think patch release was suppose be today..
    Do not want to help customers these days, just be silent and hope customers go away...
     
  15. 3dgrinder

    3dgrinder

    Joined:
    Oct 21, 2008
    Posts:
    249
    Code (CSharp):
    1.     // Try asset catalog on iOS 7.0+. Note, that we can't be sure that asset
    2.     // catalog is used, because the deployment target might have been lower and
    3.     // thus old launch images are used.
    4.     UIImage* image = [UIImage imageNamed:@"LaunchImage"];
    5.  
    6.     //if (image == nil)
    7.  
    That fix work for 5.2.2p2. I debugged it and found that

    UIImage* image = [UIImage imageNamed:mad:"LaunchImage"];

    image is null but when you use NSLog to print, it does value actually which is weird. I guess need another work around to find that file exist or not.
     
  16. dnomn8r

    dnomn8r

    Joined:
    Nov 15, 2012
    Posts:
    7
    5.2.2p3 is out, and it claims the issue is fixed! :)
     
  17. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    Yep, just tried the new build and I can confirm that the part of the bug that I reported - seeing double images on iPhone launch screen when using .xib launch images is NOT FIXED.

    Still looks like the image below, running on iPhone 5 with iOS 9.1, xcode 7.1, Unity 5.2.2p3

    IMG_0247.jpg

    Looks like my only solution at this point will be to just put black thumbnails into the .xib launch screen slots. Which is totally unacceptable but I can't wait another week + for a might-be-fixed.
     
    MrEsquire likes this.
  18. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    233
    Been digging into this a bit more. So I just built another basically empty project to test out something else and when the app launches on my iPhone 5, I see the same launch screen image that's in the background of the pic I posted above appear for a second as the app launches. But how can this be? That image it NOT built into this separate project/app at all. Very very strange. I even rebooted the device and it still appears when I boot the app.
     
  19. Zenix

    Zenix

    Joined:
    Nov 9, 2009
    Posts:
    210
    Can confirm that patch 3 did not fix the splash screen issues.
     
    MrEsquire likes this.
  20. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    This is getting embarrassing... With patch 3 we also have orientation issues on iPad and squashed image on iPhone. Why is this so difficult to fix, Unity?
     
    MrEsquire likes this.
  21. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    exact same problem ->> P3 DID NOT FIX ISSUES FOR ME - JUST WOW (this is getting crazy now)

    Where is the developer!
     
  22. sergi-gil

    sergi-gil

    Joined:
    Oct 29, 2015
    Posts:
    9
    for me with 5.2.2p3 is still not working...
     
  23. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,857
  24. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Please reboot the devices and delete apps, or even better -- change bundle identifier (for testing of course). It seems that many of the issues are caused by iOS caching launch screen images in some way.

    In particular, we could not reproduce the following issues:
    - Incorrect landscape orientation on iPad when only landscape orientations are allowed.
    - Incorrect splash screen orientation when legacy launch images are used on iOS 9.1.

    The following issue has been reproduced and will be fixed in the next patch release:
    - Incorrect landscape orientation on iPhone 6+ when only landscape orientations are allowed. A work around is to find `if (isIphone && _usesLaunchscreen && _canRotateToLandscapeLeft)` code in the Classes/UI/Splashscreen.mm file and replace isIphone with _isOrientable. Iphone 4 and 5 will still have incorrect orientation due to bug in iOS or Xcode.

    We could not reliably reproduce the launch screen squashing issue. It might be related to the launch screen caching. We will post more information.
     
  25. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Please provide the steps you took to test this?

    (Before I do a complete factory reset of my Apple device and wipe, so there will be no caching issues, and if that solves it then indeed I can say your correct)
     
  26. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,857
    You don't need to do factory reset. Simple reboot after deleting app you are testing should be sufficient.
     
  27. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thank you, rebooting did not solve the issue for myself.
    I wait for someone else to try who has the problem to confirm if it solved the issue for them.
    It would be very strange if cache was the issue here.


    Steps are simple as posted in another thread,

    -> Create a project, can be empty with something small inside.
    -> Player Setting, choose NONE for both Iphone Launch Screen and Ipad Launch Screen,
    -> Do not add any Legacy Launch Images.
    -> Open Project in Xcode, now manually in Images.xcassets for both AppIcon.appiconset and LaunchImage.launchimage add ALL THE SIZES (so none are missed out or empty) Deployment target 8.0

    Now test on device.

    I really need to know how you guys test this at Unity.

    PS: Ipad is orientation issue, Iphone 6 you see the squash..

    If this is my issue I take full blame, but I see others confirmed they have problem also so I doubt what Im doing is wrong..
     
  28. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    Here are my steps:
    1. Delete the app from device and reboot
    2. Delete the entire build folder and empty trash
    3. Launch Unity and change the bundle identifier in Player Settings
    4. Set both iPhone and iPad launch screens to None
    5. Disable the Unity Splash Screen
    6. Target minmum iOS version 6.0 with IL2CPP and Universal Architecture
    7. Check only Landscape Right and Landscape Left in Allowed Orientations for Auto Rotation
    8. Create a new build with a new folder name
    9. Deploy with Xcode 7.1 without making any changes other than code signing
    Result: splash is getting squashed on iPhone 6 running iOS 9.1. It's especially noticeable on first launch while second and third launch look more like a small hiccup or glitch.
    I don't have an iPad running iOS 9.1 at home, but an old iPad 3 running iOS 7 works fine without any issues with the splash screen.

    Edit: almost forgot that I also disabled the Unity Splash Screen. It appears that the issues actually occur during this second splash screen.
     
    Last edited: Nov 9, 2015
    MrEsquire likes this.
  29. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    @MrEsquire, @peterahou

    Have you submitted bug cases with attached reproduction projects? Non trivial issues are not reproducible most of he time without having user project.

    Wrong orientation problems can be observed when orientation lock is set to on. This has not been investigated yet, timeline for a fix is uncertain.

    A fix for squashed iphone splash is expected in 5.2.2p4 unless something bad happens. The workaround is to remove ViewP view in Launchscreen-iPhone.xib file.
     
  30. ImangiStudios_jnakai

    ImangiStudios_jnakai

    Joined:
    Jul 7, 2015
    Posts:
    1
    We're on Unity 5.2.2 and were seeing some issues with the loading splash screen in portrait mode getting stretched incorrectly on some devices. We pulled in the fix in 5.2.2p4's SplashScreen.mm to fix pre-iOS 8 devices and that helped quite a bit.

    Unfortunately we're still seeing an issue specifically with Retina 4in devices on iOS 8+ not using the correct launch image. Instead of using the retina 4" (640x1136) splash screen it seemed to be using the retina 3.5" (640x960) splash screen, resulting in a stretched out look. I fixed this locally with a workaround to detect if a device is a retina 4" display and force it to use the pre-ios8 code path. So far this seems to be working but we haven't fully tested it on all our devices yet

    The change was in SplashScreen.mm around line 109 for us (on a 5.2.2f1 created XCode project). This is Objective-C despite the code snipped saying C#

    Old snippet
    Code (csharp):
    1. UIImage* image = [UIImage imageNamed:@"LaunchImage"];
    2.  
    3. if (image == nil)
    to

    New snippet with Unity 5.2.2p4 pre-iOS 8 device fix and Retina 4in fix
    Code (csharp):
    1. UIImage* image = [UIImage imageNamed:@"LaunchImage"];
    2.  
    3. // Add check for retina 4in size display to force proper launch image
    4. CGSize screenSize = [[UIScreenmainScreen] bounds].size;
    5. bool isRetina4Device = isIphone && (screenSize.height == 568 || screenSize.width == 568);
    6.  
    7. if (!_ios80orNewer || image == nil || isRetina4Device)
    The retina 4in change seems to fix the splash screen Unity shows, however the splash screen iOS shows as unity is booting is just a black screen for my iOS 9 device. Maybe this is an iOS bug where it's not showing the Retina 4in launch image properly?

    Hope this is helpful, I battered my head on this for awhile yesterday.
     
    Last edited: Nov 10, 2015
    MrEsquire likes this.
  31. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    52
    Prior to 5.2 when splash screens worked as expected, we would always have our first scene actually have the splash image in it so that once the first scene has loaded, we can fade out the splash screen.

    It was always in the back of my head that some scenario would mess this approach up. Now it has happened.

    Now there seem to be several levels of splash screens, cycling through different images. Should we keep this approach? Or, is there a better way to approach this, assuming the device specific issues listed above get resolved?
     
  32. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Dear Povilas, I do not wish to get into the whole debate about Unities bug reporting ways and your QA processes that fail to put good priory on important issues and bugs. You are correct for complex bugs and issues a report should be submitted but in this case my 8GB project sadly do not wish to share with Unity and waste more of my time making some kind of repo that not work. I think you don't understand the main issue here is TIME. The comments in the threads speak for themselves. I think your QA team need make own bug reports aswell as just waiting for customers to be guinea pigs for problems. But your a developer so do not need to worry yourself with this.

    With the Orientation lock, you are correct the device had this enabled, but sending you a Unity repo would have not solved or helped you find problem faster. Maybe the squash issue would have found it sooner I guess. But as you can see again even the 5.2.2p4 is delayed without any word when we can expect it. So its been almost over 3 weeks, this all means one cannot release the mobile application as some people spend time on there games and initial release with these weird splash screen is not good for anyone.

    My posts may seems negative but I'm confident that the issue does not lie with yourself as your restricted to Unities processes. Thanks
     
  33. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    So, p4 is out now, but we're still having issues.
    I quickly tested our project on an iPhone 6 running iOS 9.1 where I observed the stretched splash screen on first launch after install. The splash screen appeared fine on second launch.
    I then tested on an iPad Air running iOS 8.0.2 and it displayed the orientation issue on every launch.
    Next, an iPad Mini 3 running iOS 9.0 also displayed the orientation issue on every launch.
    Finally, an iPad Air 2 running iOS 9.1 had the orientation issue on first launch, but appeared fine on second launch.

    Before each test, the app was deleted from the device and I used both a new build folder and a new identifier.
    I'll try to make a repro project and submit a proper bug report. This is definitely not solved yet.
     
    MrEsquire likes this.
  34. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    I could easily reproduce the issues with a clean project. Bug report has been submitted with case number 745017.
     
  35. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Yep, doesnt take hours to reproduce - have you tried enabling and disabling orientation lock on the physical devices and see if any difference..
     
  36. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    Orientation lock doesn't appear to make any difference. I had it off during my tests, but turning it on gives the same results.
     
  37. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thanks for confirming as it says by the developer if you read posts above that this was connected to issue. I have simply given up on this matter and didnt test after. I hope you get a reply to your bug report and dont have to wait another few weeks . Cheers
     
  38. Benzor

    Benzor

    Joined:
    Dec 29, 2013
    Posts:
    11
    Hey guys, I've been following this thread for a while because I've also had crazy splash screen problems, but things have improved now.

    I upgraded to Unity 5.2.2p4 (which came out just a few days ago) and it fixed the issue with the splash screen starting in squished portrait mode on iPhone 5S/5C devices (i.e. anything that is taller than the old phones).

    Note that from within Unity, I export the Xcode project with iPhone/iPad Launch Screen player settings set to "None," so bypassing the horribly buggy XIBs and using standard asset catalogs instead.

    I still have one minor bug remaining, and it is that now the splash screen starts oriented wrong (i.e. always upside down, but then flips as soon as the game starts), and I wish that would be fixed too, but it's good enough to ship now, IMO. If anybody has a workaround for this, I would be super excited to hear it!
     
    MrEsquire likes this.
  39. Nickjd331

    Nickjd331

    Joined:
    Aug 22, 2014
    Posts:
    13
    Hi, I've also been following this thread, having similar issues.

    On my main test phone (iPhone 6S on iOS 9.1) the splash screen appears fine for a split second, before distorting.

    It always seemed to replace the correct splash screen with a wider version (such as from the iPad) and squeeze it to fit the screen.

    I've now just done a new build with a solid colour splash screen that wouldn't show distortion, replacing them with the correct versions in Xcode. I expected the correct version to show followed by the solid colour, however when loading the app it just takes the Xcode splash screens and distorts them again, but now stretching rather than squeezing!

    I'm looking forward to seeing the next patch to see how this changes, as I've been holding off my release for quite some time now.


    P.S. It's also worthing noting that the renaming of the splash screens saved out by unity is inconsistent/wrong.

    3 of the splash screens are named Default-Portrait.png, Default-Portrait@2x.png and Default-Portrait@3x.png. The first two are iPad splash screens, the third is the iPhone 6 Plus.
     
    MrEsquire likes this.
  40. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thanks for the additional info and finding another issue..seems many smaller issues, not sure why they not just start from begginning instead of constant patching, only going to get more headche when the iPAD pro and Apple TV comes out. Anyway I was not willing to reply as I have no solution but like yourself I have been holding off releasing my games because of this problem. I cant stop now until I know this issue has been given highest priority..I predict again this week 5.2.3 final release may not have fully solve the issue and as we close to 5.3 final release its getting worrying..
     
  41. Huffmann1

    Huffmann1

    Joined:
    Jan 29, 2013
    Posts:
    4
    I upgraded to Latest unity update yesterday (November 17th) and it Jacked up my splash screens ! Weird stretches and rotations. Specifically iPhone 5 shows correct when second stage streched. IPad starts correct second stage rotated and stretched.

    This issue was not happening in 5.0.1 . which I upgraded from.
     
    MrEsquire likes this.
  42. Huffmann1

    Huffmann1

    Joined:
    Jan 29, 2013
    Posts:
    4
    image=nil; on line 110 of SplashImage.mm fixed this issue !

    Tested on 5.2.2 iPad 1, iPhone 5, iphone 4. iOS ranging from 7-8

    havent tested on 9 yet.
     
    peterahou and MrEsquire like this.
  43. peterahou

    peterahou

    Joined:
    May 19, 2015
    Posts:
    47
    I just tested on iOS 9.1 with both an iPad Air 2 and an iPhone 6 and the image=nil; fix worked with 5.2.2p4. It didn't work with 5.2.2p3.
     
  44. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Installed 5.2.3 final and did as you told... and and and , wait for it....ALL IS FIXED..Finally after this long can update my games.. (As peterahou mentioned, this did not work before)
     
  45. super77gg

    super77gg

    Joined:
    Sep 25, 2014
    Posts:
    46
    Thanks guys! After lots of trial and error, the image=nil worked for us as well. Now we can release!
     
  46. Nickjd331

    Nickjd331

    Joined:
    Aug 22, 2014
    Posts:
    13
    Wahoo.

    Changing line 110 of SplashImage.mm to 'UIImage* image = nil;' works for me too!

    Hopefully this doesn't have any negative side effects!
     
  47. dustinbahr

    dustinbahr

    Joined:
    Sep 10, 2012
    Posts:
    52
  48. sergi-gil

    sergi-gil

    Joined:
    Oct 29, 2015
    Posts:
    9
    Yeah!, with Unity 5.2.3f1 it's not working, but it seems that changing line 110 of SplashImage.mm to 'UIImage* image = nil;' works!!!

    Hurry up Unity!!! The Splash screen hell it's almost patched!!!
     
    MrEsquire likes this.
  49. Benzor

    Benzor

    Joined:
    Dec 29, 2013
    Posts:
    11
    @sergi.gil and others who are using this fix of setting UIImage to nil:

    Have you guys tested across multiple devices and OS versions? I am hoping I can finally have my game launch properly on tall screens (iPhone 5/5S), big screens (iPads) and small screens (iPhone 4S and older), and then also on older versions of iOS too (all my devices have iOS 9.1).
     
  50. Chetim

    Chetim

    Joined:
    Jan 30, 2013
    Posts:
    12
    I got the splash screen to work finally as well, but had to change the Screen Type of the iPhone Launch Screen and iPad Launch Screen to None instead of Default.

    Edit: I just made another build and it worked without the "image = nil;", just changing the type from Default to None worked.

    Edit: Had to use "image = nil" in the end after all. It was still broken on the iPhone 6 (and actually was on the 5 as well, the transition between the two splash screens just wasn't as noticeable).
     
    Last edited: Dec 1, 2015
unityunity