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

Orientation not locking on tablet

Open LucDrenth opened this issue 4 years ago • 9 comments

When turning on device orientation upsidedown in xcode the orientation locking stops working on tablet. Mobile works just fine. I am testing on a tablet simulator iPad Pro (12.9-inch) (4th generation). I need to have this setting enabled to deploy the app to appstoreconnect (Testflight).

LucDrenth avatar Feb 16 '21 08:02 LucDrenth

Confirmed. I am testing in real devide (iPad), the plugin not show any logs :(

davidcort avatar May 14 '21 17:05 davidcort

same question, any idea?

blackbing avatar Jul 08 '21 08:07 blackbing

Any idea how to get this to work?

Rraya13 avatar Sep 06 '21 22:09 Rraya13

Same for me.

alenSavov avatar Sep 07 '21 13:09 alenSavov

same for me, ipad not work

peeratattt avatar Sep 30 '21 11:09 peeratattt

same for me!

patissier-boulanger avatar Nov 05 '21 05:11 patissier-boulanger

and can not uncheck orientation upsidedown because xcode won't build

patissier-boulanger avatar Nov 05 '21 05:11 patissier-boulanger

After deactivating all except Portrait(or whatever you want) in Xcode use Orientation.unlockAllOrientations(); to unlock all Orientations afterwards.

Example:

If QR Code screen in Portrait is my inital orientation and after scanning i want that the user is send to a diffrent screen with the ability to change orientations as they like.

I guess that works.

Klaucss avatar Jan 21 '22 14:01 Klaucss

See #126

For iPads the UIRequiresFullScreen flag needs to be set in order for the supportedInterfaceOrientationsForWindow-method (used by this package) to get called: https://stackoverflow.com/questions/35274428/supportedinterfaceorientations-not-called-in-ipad

Caveat: Setting this flag disabled multitasking support on iPad.

DanielKuhn avatar Oct 18 '23 14:10 DanielKuhn