react-native-orientation-locker icon indicating copy to clipboard operation
react-native-orientation-locker copied to clipboard

addOrientationListener give me a previous state (iOS16 , release build)

Open tapetong9 opened this issue 2 years ago • 5 comments

When I use this

Orientation.addOrientationListener()

the state that I got is the previous state, not the current state.

for example

when I move from Portrait to Landscape-Left => I got "Portrait" when I move from Landscape-Left to Landscape-Right => I got "Landscape-Left " when I move from Landscape-Right to Portrait => I got "Landscape-Right"

this issue will happen on iOS 16 with the "release build" only

tapetong9 avatar Sep 16 '22 09:09 tapetong9

The same for me! But, there is a trick. After changing the orientation, placing your phone parallel to the ground will give you the correct orientation. For both cases. Surely this is not a solution to the problem, but an interesting fact.

kosbog avatar Sep 27 '22 12:09 kosbog

Hi, we have the exactly same issue on iOS 16 too, and only in release builds. We also observe that placing the phone parallel to the ground returns the correct orientation.

Reproduced both with addOrientationListener and useOrientationChange.

Using version 1.4.0.

Jim-Bar avatar Oct 12 '22 16:10 Jim-Bar

Reproduced with 1.5.0 too. Turning the iPhone upside down also gives the correct orientation. addDeviceOrientationListener and useDeviceOrientationChange seems to work as expected.

Jim-Bar avatar Oct 13 '22 13:10 Jim-Bar

Same issue here

ws333 avatar Feb 05 '23 17:02 ws333

Same problem with version 1.6.0

ivaniuk7531 avatar Jan 24 '24 07:01 ivaniuk7531