Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25269] iPhone X: Support new launch-images (when not using storyboards)

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-10-31T18:48:24.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.3.0
ComponentsiOS
Labelsappleblocked, applebug, iphonex
ReporterHans Knöchel
AssigneeHans Knöchel
Created2017-09-13T07:23:09.000+0000
Updated2017-11-13T08:57:15.000+0000

Description

*(Currently blocked by a bug inside Xcode, see the comments below)* Add small change to iOS-build to add the new launch-screen to the asset-catalog. Please note that this only applies for custom splash-screens. Everyone using storyboards (the recommended way be Apple these days that we also support) will not have to change anything.

Attachments

FileDateSize
expected-behavior.png2017-09-13T12:21:46.000+0000166475

Comments

  1. Hans Knöchel 2017-09-13

    PR (timob/master): https://github.com/appcelerator/titanium_mobile/pull/9423 PR (timob/6_3_X): https://github.com/appcelerator/titanium_mobile/pull/9427 PR (alloy/master): https://github.com/appcelerator/alloy/pull/849 Test-Case:

    Create a new App with appc new -p ios

    Run the app on an iPhone X simulator

    Run the app on an iPhone 7 simulator (or any other one lower than X)

    Confirm that the app is full-screen and not cropped

  2. Dan Tamas 2017-09-14

    [~hknoechel] I believe you forgot to add some code in TiUtils and TiRootViewController - on app start the app will display after the correct splashscreen the Default-Portrait-736h@3x.png image as bg of the root view wich will create an ugly "zoom" effect. Thanks.
  3. Hans Knöchel 2017-09-14

    Good catch Dan, I didn't think about that so far! Storyboards are so much nicer :-). Will update the PR's!
  4. Dan Tamas 2017-09-14

    Sadly we can't always use storyboards :( Thank you!
  5. Hans Knöchel 2017-09-14

    [~rborn] PR's updated. Will need to do more testing tomorrow!
  6. Dan Tamas 2017-09-15

    [~hknoechel] sadly is not ok yet, the 736h image will be found anyway in the TiRootViewController so the image will be defined. I think you need to implement something like the code below in TiUtils, similar to *isRetinaiPhone6* and then use it inside the TiRootViewController
       +(BOOL)isRetinaiPhoneX
       {
           if ([TiUtils isIOS8OrGreater]) {
               CGSize mainScreenBoundsSize = [[UIScreen mainScreen] bounds].size;
               return (mainScreenBoundsSize.height == 812 || mainScreenBoundsSize.width == 812);
           }
           return NO;
       }
       
    Thank you.
  7. Hans Knöchel 2017-09-15

    Hey Dan, yeah I nearly expected that. Let me spend a bit more time on this to not rush. Updating soon.
  8. Hans Knöchel 2017-09-16

    Ok, here we go: I updated the default-screen handler to grab the correct images and distinguish between iPhone 6 Plus and iPhone X as well. But unfortunately, the portrait screen right now will still look stretched, because it won't be able to find the LaunchImage-1100-Portrait-2436h@3x.png inside the copied app. But here is the thing: It's the same for native apps running with manual images, so likely Apple has an issue with not copying it over correctly. I'll file a radar for that on Monday. More on that as I hear back from Apple! *EDIT*: I've opened this [Stackoverflow](https://stackoverflow.com/questions/46263795/iphone-x-incorrect-launch-screen-orientation-used) to get some more feedback from the iOS community. Radar also filed.
  9. Dan Tamas 2017-09-18

    [~hknoechel] Hey, I saw some changes in the PR, also added a comment. Is it better or you're still waiting for Apple's reply? Thnx.
  10. Dan Tamas 2017-09-20

    [~hknoechel] any news from Apple? or any news at all? :)
  11. Hans Knöchel 2017-09-20

    No feedback regarding the radar so far, only some people with the same issue in the native world. Looks like most apps are using storyboards these days. Still no reason to not do this, but it's hard without the Apple tooling working :-(
  12. Hans Knöchel 2017-09-29

    Update: I received feedback from Apple today and they can confirm it is a bug in their tooling. Until we know more, please use storyboards for the iPhone X. "Luckily" we have another full month before the iPhone X gets shipped, so developers (both native and Titanium ones) can push their apps when Apple provides a fix. Thanks! P.S.: The radar is [rdar://34480903](https://openradar.appspot.com/radar?id=6124283306704896)
  13. Dan Tamas 2017-09-29

    Ok, thank you
  14. Hans Knöchel 2017-10-11

    The latest answer from Apple: {quote} Thank you for following up, and for the bug report. I confirmed that this issue is present with my own tests. However, I can't advise you on any future releases from Apple. I encourage you to test this issue on future beta and public releases of the iOS 11 SDK, and to update your bug report with your results. {quote} To unblock the 6.3.0 release, I will move it out of the current release and re-schedule this for 7.0.0 - when Apple hopefully will provide a fix for Xcode until then. Until then, please use Storyboards to support the iPhone X and duplicate the above radar (*rdar://34480903*) to prioritize the issue at Apple.
  15. Hans Knöchel 2017-10-18

    Xcode 9.1 Beta 2 seems to fix the issue! Will update the PR accordingly. *EDIT*: master: https://github.com/appcelerator/titanium_mobile/pull/9533 6_3_X: https://github.com/appcelerator/titanium_mobile/pull/9534 &: https://github.com/appcelerator/titanium_mobile/pull/9573
  16. Eric Wieber 2017-11-07

    Verified in SDK builds 6.3.0.GA & 7.0.0.v20171107142411
  17. nicolomonili 2017-11-13

    Update the Docs for iPhone X [http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens](http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens)

JSON Source