[TIMOB-25269] iPhone X: Support new launch-images (when not using storyboards)
GitHub Issue | n/a |
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-10-31T18:48:24.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.3.0 |
Components | iOS |
Labels | appleblocked, applebug, iphonex |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2017-09-13T07:23:09.000+0000 |
Updated | 2017-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
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
[~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.
Good catch Dan, I didn't think about that so far! Storyboards are so much nicer :-). Will update the PR's!
Sadly we can't always use storyboards :( Thank you!
[~rborn] PR's updated. Will need to do more testing tomorrow!
[~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
Thank you.
Hey Dan, yeah I nearly expected that. Let me spend a bit more time on this to not rush. Updating soon.
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.[~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.
[~hknoechel] any news from Apple? or any news at all? :)
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 :-(
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)
Ok, thank you
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.
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
Verified in SDK builds 6.3.0.GA & 7.0.0.v20171107142411
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)