tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.75k stars 1.21k forks source link

iOS: forcing rotation issues on some specific iPhone models #14060

Open Informate opened 3 months ago

Informate commented 3 months ago

I have searched and made sure there are no existing issues for the issue I am filing

Description

On some iPhione devices forcing rotation may not work correctly in non-modal windows on iOS (Especially on iPhone 8). (The Titanium SDK Guide already warns you that this could lead to unexpected behaviors). Also on Android some flickering issues is present as the window is at first drown on screen with the wrong rotation and then correctly redrawn.

The following is a list of iOS devices supposed to be affected by the issue (compiling the code with Xcode 15.4):

 Ti.Platform.model                     Device
 iPhone14,6                        iPhone SE 3rd gen 2022
 iPhone10,5                        iPhone 8 Plus
 iPhone10,4                        iPhone 8 Plus
 iPhone10,2                        iPhone 8
 iPhone10,1                        iPhone 8
 iPhone9,*                         iPhone 7 Any?

FIXING WORKAROUND for iOS: Pass-trough a modal dialog window, by opening and closing it programmatically, while you are opening the forcing rotation window.

Expected Behavior

The window rotates correctly. Possibly without a prior flickering on the uncorrect layout rotation.

Actual behavior

The window do not rotate correctly on some iPhone devices. The window appear at first on the wrong layout rotation and then is redrawn correctly on Android.

Reproducible sample

-

Steps to reproduce

Switch the rotation between portrait and landscape, forcing it in different consecutive windows while keeping the real device under a different orientation (Horizontal or vertical).

Platform

Android, iOS

SDK version you are using

12.4.0.GA

Alloy version you are using

No response

Informate commented 2 weeks ago

Would someone be so kind as to help me complete the list of devices affected by the rotation problem? Especially because also new device are unexpactedly affected! In particular I suspect that iPhone SE 2nd gen 2020 could be affected (Ti.Platform.model: iPhone12.8) but I cannot find a device to test the problem!