Search Unity

iPhone 8 / 8Plus / X support

Discussion in 'iOS and tvOS' started by Mantas-Puida, Sep 29, 2017.

Thread Status:
Not open for further replies.
  1. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I would like to share quick update on our support for iPhone 8 / 8Plus / X.

    There is known problem with A11 GPU and Unity content, which causes shadow flickering. Fixes have been pushed to supported Unity branches, so to avoid rendering glitches on new Phones it's recommended to upgrade Unity to following versions and re-build / update your games in App Store:
    - 5.5.5 Patch 1 (not yet released, scheduled for second week of October)
    - 5.6.3 Patch 4 (or later) wait for 5.6.4 Patch 1
    - 2017.1.1 Patch 3 (or later) wait for 2017.1.2 Patch 1
    - 2017.2.0 RC 2 (or later)


    Update!!!:
    Unfortunately we discovered that our fix for A11 GPU (iPhone 8 / 8Plus / X) regressed in shader compilation correctness on macOS 10.11.6 and iOS 8.x and earlier.
    Proper fix is coming in these versions:
    5.5.5 Patch 1
    5.6.4 Patch 1
    2017.1.2 Patch 1



    iOS Device generation enum fields for detecting these devices are being added and will appear into corresponding branches from 5.6 to 2017.x. Estimated to come in 1-2 weeks depending on branch.

    iPhone X safe area detection API is being designed and implemented. Estimated time of delivery 2-3 weeks. Currently you can try our sample plugin for accessing safe area information: https://bitbucket.org/p12tic/iossafeareasplugin/src

    Otherwise your application should work just fine on new devices. If you don't rebuild your apps with Xcode 9 they will be letterboxed on iPhone X.

    There are no plans for fixes / support for older unsupported (5.4.x and older) Unity versions.
     
    Last edited: Oct 12, 2017
    GarthSmith likes this.
  2. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Thank you for supporting these new devices. Did I miss anything about support for the recent iPads? As I have not heard anything from Unity about ProMotion support.
     
  3. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    2017.3 beta is mostly ready for it. But you have to manually add CADisableMinimumFrameDuration Info.plist key.
     
    Moonjump likes this.
  4. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  5. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Unfortunately we discovered that our fix for A11 GPU (iPhone 8 / 8Plus / X) regressed in shader compilation correctness on macOS 10.11.6 and iOS 8.x and earlier.
    Proper fix is coming in these versions:
    5.5.5 Patch 1
    5.6.4 Patch 1
    2017.1.2p1
     
    protopop and MrEsquire like this.
  6. jareds

    jareds

    Joined:
    May 8, 2008
    Posts:
    207
  7. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Most likely yes. Unfortunately I'm not aware about workarounds. Though you could try one of current patch releases on iPhone 8 to verify that your issue is exactly the same.
     
  8. jareds

    jareds

    Joined:
    May 8, 2008
    Posts:
    207
    Thanks Mantas. We tried 2017.1.1p4 and 2017.1.2f1 and both seem to resolve the issue. In the above post you mention a regression for iOS 8 and earlier. Our app requires iOS 9 or later, so should we theoretically be able to use the current versions to resolve the issue, or would you recommend waiting for the proper fix? Any updates on when those will be available?
     
  9. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    You should be fine with current fix.
     
  10. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    I'm not sure what shader compilation correctness is exactly, but I hope that's what happened to me. Im on Unity 5.6.3 patch 4 and on IOS 11 iPhone 6 all is good, but on iPad Air 2 IOS 8 there are all these "compilation failed / shader unsupported" messages and everything is pink!

    I'm using MacOS 10.10 so it sounds like what you are talking about.

    I'm looking forward to the patch with patience because i have been stuck on Unity 5.2 for a few years due to regressions, and 5.6.3 is the first version where my game works again (thank you) so i am really excited about the opportunity to finally upgrade my version of Unity:) Good luck with the patch.
     
  11. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Yes, you are experiencing regression, which was mentioned in this thread. Release of corresponding 5.6 patch release is scheduled for Oct 18-20.
     
    protopop likes this.
  12. secondimpactrob

    secondimpactrob

    Joined:
    Oct 9, 2017
    Posts:
    5
    Would you mind providing some more detail on exactly how/when Unity decides to show the letterboxing you mention for iPhone X?

    I have an existing project which has been upgraded to 5.6.3p3 and it is showing the letterboxing when built with xCode 9. And then I made a new clean Unity project in 5.6.3p3 and this does not letterbox the app when built with xCode 9. Would like to understand how exactly this is enabled/disabled. (Would be great if this was just a check box in player settings but I can't seem to find one that would be it).

    Thanks
     
  13. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Building with Xcode 9 should be enough, what are your splashscreen settings in the project that shows letterboxing?
     
  14. voldemarz

    voldemarz

    Joined:
    Sep 19, 2011
    Posts:
    25
    If we use macOS 10.12+ we shouldn't have issues with iOS 8.x for builds of 5.6.3 Patch 4. Correct?
     
    protopop likes this.
  15. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    That's not correct.
    The regression affects:
    - Mac standalone and Metal editor on macOS 10.11.6
    - iOS games running on iOS 8.x or earlier device (doesn't matter which macOS was used for building app)
     
    protopop likes this.
  16. secondimpactrob

    secondimpactrob

    Joined:
    Oct 9, 2017
    Posts:
    5
    The project that shows letterboxing has: 'show splash screen' turned off and launch screen type set to 'none'.

    Can confirm that setting the new project to match these settings it now also letterboxes.
     
  17. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    You need to specify either some Launch Screen, which adapts to whole screen or Legacy Launch Image that specifies image of resolution that matches iPhone X resolution. The first one is available to be set from Unity, though later one is not, but you can do it manually in Xcode.
     
  18. secondimpactrob

    secondimpactrob

    Joined:
    Oct 9, 2017
    Posts:
    5
    Thanks for clearing that up.
     
  19. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    Good to see Unity's looking at iPhone X...

    We are using NGUI in our game, the safe area plugin seems not very useful for us, at the meantime we may just manually add padding on left, right and bottom for iPhoneX...

    Hope the iOS Device generation enum will be available soon so we can start working on it. (It will be there on 5.6.4 right?)

    We use:
    Unity 5.6.3p4
     
    Last edited: Oct 12, 2017
  20. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    New enum entries will ship in 5.6.4 Patch 1 (somewhere next week).
     
  21. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    We have some games built with Unity 4.x on the iOS App Store, which would be quite laborious to import into Unity 5 and republish....are those going to have this flickering issue on iPhone 8?
     
  22. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    We haven't received reports about that. I think switching to GLES 2.0 might be good workaround in such case.
     
  23. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    What about Unity 2017.2 that was released today?
     
  24. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    It should have final fix.
     
  25. dpizzle

    dpizzle

    Joined:
    Feb 2, 2013
    Posts:
    31
    Can you confirm that this only affects apps built with Metal running on A11 devices? We have a lot of older apps built with OpenGLES2 we'd rather not have to republish.
     
  26. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Unity uses different shader compiler for GLES 2.0, so that's why it's most likely not affected. Unfortunately we don't yet have 100% confirmation that it's not being affected. I would recommend you testing your app on actual iPhone 8.
     
  27. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    Any news on the device detection enums for the new iPhones?
     
  28. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    They are on the way to patch releases, which Unity version are you interested in?
     
  29. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    We are using Unity 2017.2.0f3. Will we see a patch for it before the 24th of this month? Thanks!
     
  30. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    protopop likes this.
  31. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    Thanks. That's a life saver!
     
  32. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,561
    I second this:) I dont even use the enums and can successfully detect all devices using this even though im still on Unity 5.2.2 for my main production pipeline. This way you never have to wait for device enums to be patched in.
     
  33. shellyalon

    shellyalon

    Joined:
    Mar 26, 2013
    Posts:
    27
    I've got a quick question. I've got a couple of games on the Appstore that were built with Unity 5.6 and 2017.1. They're simple 2D games with no shadows (so I'm not worried about that). But I'm worried about this stupid notch on the X.
    Do I understand it correctly, that if I just let them be and not rebuild them in Unity and xCode, they will be letterboxed on the iPhone X? So no further action is required?

    <3
     
  34. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Yes, your assumption is correct.
     
    protopop likes this.
  35. shellyalon

    shellyalon

    Joined:
    Mar 26, 2013
    Posts:
    27
    Oh my that is wonderful! Thanks!
     
  36. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    - Is the shadow flickering issue still present in the latest 2017.2 build?
    - What is the string we can expect for iPhone X? Perhaps it’s (iPhone10,1) ?
    Thanks!
     
  37. SweatyChair

    SweatyChair

    Joined:
    Feb 15, 2016
    Posts:
    140
    I have created a post and feature request on adding option to hide iPhone X home indicator and bring it back (Edge Protection). Vote it up if that matter to you as well please.
     
  38. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Latest flickering fix will be in 2017.2 patch 1, which is not yet out (expected Oct 25-27).
    iPhone X model strings are: "iPhone10,3" and "iPhone10,6".
     
    Mimicry likes this.
  39. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    That is a total bummer as we have a deadline with Apple. Thanks anyway
     
  40. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    which iOS versions are you targeting? if you are aiming for iOS 9 and higher then current 2017.2.0f3 release should be good for you.
     
  41. MassiveTchnologies

    MassiveTchnologies

    Joined:
    Jul 5, 2016
    Posts:
    87
    Ok good to know. We have iOS 8 and up as a target but we didn't have any of the compilation issues. Not sure if that means the shadow problem is fixed or we have to submit an update with iOS 9 as a minimum target?
     
  42. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Actually, I mismatched Unity versions. So 2017.2.0f3 should be good for you (including earlier iOS versions). Sorry for confusion.
     
  43. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    Currently the following iPhone X-specific features are in process of being delivered:
    - Safe areas API (Screen.safeArea): 2017.2.0p2 (or maybe 2017.2.0p1 but this is not guaranteed) and 2017.3.0b7.
    - Player settings to mark certain screen edges as "protected" (the system gestures will be deferred to the second swipe): 5.6.4p3, 2017.1.2p4, 2017.2.0p2, 2017.3.0b8.
    - Player setting to hide home button indicator: 5.6.4p3, 2017.1.2p4, 2017.2.0p2, 2017.3.0b8.
    - iPhone X legacy launch image support: 5.6.4p3, 2017.1.2p4, 2017.2.0p2, 2017.3.0b8.
     
  44. jareds

    jareds

    Joined:
    May 8, 2008
    Posts:
    207
    Thanks for the update! Is there a schedule for when these releases will be available? If we're using Unity 5.6 should we try to use the safe area plugin referenced by Mantas above to work with the iPhone X safe areas, or would you recommend something else?
     
  45. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    For safe area API on older Unity versions you should keep using plugin.
     
  46. FP-Arttu

    FP-Arttu

    Joined:
    Nov 9, 2015
    Posts:
    1
    Is an older version of XCode (8.3.3) required to get the wanted letterboxing behavior or can I build with XCode 9? Using Unity 5.6.3.
     
  47. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    What exactly you mean by letterboxed? Will it be letterboxed within safe area by default and app resolution will be capped at 9:16 ?
     
  48. thomas-weltenbauer

    thomas-weltenbauer

    Joined:
    Oct 23, 2013
    Posts:
    72
    Sorry for asking here, but it is iPhone 8 / iPhone X related and some of you might have an Unity App out there, which is installed by many users:

    Does nobody else have problems with crashes on iPhone 8 (and I think on iPhone X too) with "GPU Hang" error messages?
    (See the detailed thread here)
    I can't believe we are the only ones especially as this seems to be a driver issue or a bug in Unity (as said in the thread).
     
  49. povilas

    povilas

    Unity Technologies

    Joined:
    Jan 28, 2014
    Posts:
    427
    See here: https://developer.apple.com/ios/human-interface-guidelines/overview/iphone-x/

    In short, the display will have black bars on top and bottom to adjust the aspect ratio to 9:16. This does not correspond to the safe area, which is much larger and extends further to the upper and lower screen edges.
     
    GarthSmith likes this.
  50. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    Hi @Mantas-Puida
    It seems we have a problem with iPhone X simulator.
    When we try to open the virtual keyboard with this code :
    Code (CSharp):
    1. TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, false, false, false, false);
    it does nothing. If we try the same code with other iPhones simulator, it works correctly. Do you have a similar problem? (Just create an empty scene, that calls this code and you will see that it does not work) We are using 2017.1.2p1

    (Case 963179 )
     
    Last edited: Oct 27, 2017
Thread Status:
Not open for further replies.