byCedric/use-expo

useOrientation does not work for iPads

StefanSchwartze opened this issue · 3 comments

Description of the bug

The useScreenOrientation hook does not work on iPads.

To Reproduce

Just copy the example code on an iPad (real device or simulator) and render the results.

Expected behavior

It does correctly return PORTRAIT or LANDSCAPE.

Actual behavior

It always outputs "UNKNOWN" for orientation.

Additional context

Tested with Expo SDK 36

I think it's related to this issue, expo/expo#5693. There is nothing much we can do here because we are dependent on Expo for this. Let's keep this issue open until it is resolved. Thanks for reporting btw! ❤️

This should now be fixed with the new v2 release! 🎊 See this comment for more info.