You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered: