How is your experience with the OutSystems Community?
7
Views
0
Comments
[Screen Orientation Plugin] ScreenOrientationPlugin – “screen.orientation.lock is not a function” on iOS
Question
screen-orientation-plugin
Mobile icon
Forge asset by Experts
Application Type
Mobile

Hi everyone,


We’re using the Screen Orientation Plugin in one of our mobile apps, and on iOS (iPhone with iOS 26.5.2, MABS with Cordova 7.1.1) we’re getting this error when calling LockOrientation:


It happens even when CheckScreenOrientationPlugin returns IsAvailable = True.


We had a look at the plugin code. CheckPlugin only checks whether screen.orientation exists. On recent iOS versions WebKit already provides that object natively, but without lock()/unlock(), so the check passes and the call then fails. We also noticed that the Extensibility Configurations don’t pin a version of cordova-plugin-screen-orientation, so every build pulls the latest master.


We’ve added a workaround in our app for now, but it would be great to have this fixed in the plugin itself. Is anyone else seeing this? Are there any plans to release a fix?


Thanks in advance!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.