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

fix: orientation on iOS16

Open gramiro opened this issue 3 years ago • 13 comments

I've modified Orientation.m according to what Apple is requiring on iOS16 since [[UIDevice currentDevice] setValue:forKey:]; appears to be buggy.

Notice that the changes are under a condition of the OS being iOS16.

gramiro avatar Sep 30 '22 08:09 gramiro

Other than iOS 16, Builds are failing.

NeerajNema1988 avatar Nov 10 '22 06:11 NeerajNema1988

Other than iOS 16, Builds are failing.

same issue for me iOS builds are failling.

codal-mpawar avatar Nov 11 '22 06:11 codal-mpawar

Fixed failing build by wrapping ios 16 code with #ifdef __IPHONE_16_0

Here's a patch file I made if you're using patch-package

https://gist.github.com/nicolas6422/80cbc4528b4d4798c53ffdd2f56c3625

nicolas6422 avatar Nov 18 '22 22:11 nicolas6422

Fixed failing build by wrapping ios 16 code with #ifdef __IPHONE_16_0

Here's a patch file I made if you're using patch-package

https://gist.github.com/nicolas6422/80cbc4528b4d4798c53ffdd2f56c3625

works on ios 16

kesha-antonov avatar Nov 22 '22 21:11 kesha-antonov

@nicolas6422 do you know if that's future proof? Like next year's iOS 17?

gramiro avatar Nov 23 '22 08:11 gramiro

@gramiro yes, __IPHONE_16_0 will always be defined after for Xcode >= 14

nicolas6422 avatar Nov 23 '22 16:11 nicolas6422

@gramiro @nicolas6422 any update for release mode because its not working for release mode.

codal-mpawar avatar Nov 29 '22 12:11 codal-mpawar

Seeing the same issue that this doesn't work in release mode

brycnguyen avatar Dec 01 '22 01:12 brycnguyen

@codal-mpawar ran into a similar issue, for us we build our app with eas so it was about setting the image property of ios to latest in our eas.json file so that our app was built with the latest Xcode 14.1 sdk.

ubdorji avatar Dec 01 '22 21:12 ubdorji

@gramiro If you have a solution can you please fork the library and try to resolve this if possible? it will great help for us.

codal-mpawar avatar Jan 03 '23 11:01 codal-mpawar

seems the camera screen is also orientated, is any way to fix?

LuczDev avatar Feb 23 '23 03:02 LuczDev

hii as any one found solution I am also facing issue related to orientation locktolandscape not working

Please @LuczDev if you found any solution please respond asap thanks

swaroopaillinda avatar Mar 25 '23 09:03 swaroopaillinda

@gramiro If you have a solution can you please fork the library and try to resolve this if possible? it will great help for us.

Did you find solution for release mode?

Yandamuri avatar Oct 16 '23 06:10 Yandamuri