Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error CDVOrientation screenOrientation INVALID ["options": [15, any]] on unlock() method in iOS #85

Open
3 tasks done
rdece opened this issue Sep 21, 2021 · 0 comments
Open
3 tasks done

Comments

@rdece
Copy link

rdece commented Sep 21, 2021

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

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant