react-native-orientation-locker
react-native-orientation-locker copied to clipboard
addOrientationListener give me a previous state (iOS16 , release build)
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
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.
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
.
Reproduced with 1.5.0
too. Turning the iPhone upside down also gives the correct orientation. addDeviceOrientationListener
and useDeviceOrientationChange
seems to work as expected.
Same issue here
Same problem with version 1.6.0