rdece opened a new issue #85:
URL: https://github.com/apache/cordova-plugin-screen-orientation/issues/85
# Bug Report
I am trying to unlock the restricted portrait mode of an Ionic App in just
one of the pages.
## Problem
The plugin seems to work perfectly fine on Android yet whenever i try it on
iOS i get thrown an error.
### What is expected to happen?
Whenever i enter this page i am calling the unlock() method of the plugin to
allow the screen change of orientation
### What does actually happen?
It returns an error such as "To Native Cordova -> CDVOrientation
screenOrientation INVALID ["options": [15, any]]" in Xcode and "TypeError:
ctx.unlockScreenOrientation is not a function. (In
'ctx.unlockScreenOrientation()', 'ctx.unlockScreenOrientation' is undefined)"
in the browser console.
The method lock() also seems to throw the same error at Xcode varying just
the number of the options for 12 or 3 depending on the orientation i try to
lock to.
### Environment, Platform, Device
I have tested on a physical iPhone 8 device and simulators up to iPhone 12
from the 14.2 software version above
### Version information
"@capacitor/android": "^2.4.5",
"@capacitor/core": "^2.4.6",
"@capacitor/ios": "^2.4.5",
"@ionic-native/core": "^5.0.0",
"@ionic-native/screen-orientation": "^5.34.0",
"@ionic/angular": "^5.0.0",
"cordova-plugin-screen-orientation": "^3.0.2",
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]