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

Orientation is not working in real device which ios 14+

Open pawansharmaAccolite opened this issue 2 years ago • 5 comments

Hello,

Recently i have start facing this issue in ios 14+ that device orientation is not working in ios but working fine in android i don't received any error for this

already imported orientation.h file in appdelegate and method

  • (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { return [Orientation getOrientation]; }

still not able to know why its stopped working

"react-native-orientation": "^3.1.3", "react": "17.0.1", "react-native": "0.64.1",

these are the specs please provide some suggestions

also received this error for ios 16

None of the requested orientations are supported by the view controller. Requested: landscapeLeft; Supported: portrait

pawansharmaAccolite avatar Dec 06 '22 12:12 pawansharmaAccolite

yes I too facing the same issue, on ios 16, the orientation is not working, Can someone please help?

poojasolanki9569 avatar Dec 21 '22 12:12 poojasolanki9569

https://github.com/yamill/react-native-orientation/issues/411 we are still waiting for fixes.

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

hii @pawansharmaAccolite did you fix the issue i am also facing same problem please need urgenthelpp

swaroopaillinda avatar Mar 29 '23 10:03 swaroopaillinda

@swaroopaillinda You can use patch-package to this patch react-native-orientation+3.1.3.patch for hot fix https://gist.github.com/catmans1/1c980c27e6ac28439a7ec5e1063fd8ef

Store it in the folder patches

in package.json

{
...
"scripts": {
    ...
    "postinstall": "npx patch-package"
  },
...
}

catmans1 avatar Jul 04 '23 07:07 catmans1

@swaroopaillinda You can use patch-package to this patch react-native-orientation+3.1.3.patch for hot fix https://gist.github.com/catmans1/1c980c27e6ac28439a7ec5e1063fd8ef

Store it in the folder patches

in package.json

{
...
"scripts": {
    ...
    "postinstall": "npx patch-package"
  },
...
}

This patch seems to work for me

RyanMan56 avatar Oct 08 '23 15:10 RyanMan56