yamill / react-native-orientation

Listen to device orientation changes in react-native and set preferred orientation on screen to screen basis.
https://www.npmjs.com/package/react-native-orientation
ISC License
1.72k stars 810 forks source link

Orientation is not working in real device which ios 14+ #419

Open pawansharmaAccolite opened 1 year ago

pawansharmaAccolite commented 1 year ago

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

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

poojasolanki9569 commented 1 year ago

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

codal-mpawar commented 1 year ago

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

swaroopaillinda commented 1 year ago

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

catmans1 commented 1 year ago

@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"
  },
...
}
RyanMan56 commented 1 year ago

@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