apache / cordova-plugin-screen-orientation

Apache Cordova Screen Orientation Plugin
https://cordova.apache.org/
Apache License 2.0
219 stars 229 forks source link

fix(android, ios): use clobbers to overwrite screen.orientation #116

Closed jcesarmobile closed 1 year ago

jcesarmobile commented 1 year ago

For some reason the screen.orientation overwrite done from the current javascript code is not working properly in iOS 16.4 and newer. Using the clobbers tag in plugin.xml seems to fix the issue and the plugin keeps working on previous iOS versions and on Android.

closes #114 closes #35

luelher commented 1 year ago

I can confirm that this patch works in my ionic5 and Angular12 app for iOS 16.4, 16.1, 15.1 and Android 11, 12 y 13 tested in real devices.

jeremywj commented 1 year ago

This mostly works but I've noticed two issues:

1) If locked to portrait and app is opened in landscape it will stay in landscape until device is rotated. Only then will it flip to portrait and lock.

2) If locked to portrait and opened in portrait it will flip to landscape if device is rotated but immediately flip back after about 1 second. This only occurs once and then the lock seems to hold.

jeremywj commented 1 year ago

This mostly works but I've noticed two issues:

1. If locked to portrait and app is opened in landscape it will stay in landscape until device is rotated.  Only then will it flip to portrait and lock.

2. If locked to portrait and opened in portrait it will flip to landscape if device is rotated but immediately flip back after about 1 second.  This only occurs once and then the lock seems to hold.

Updating capacitor to 4.8.0 resolved the issues above.

bvleto commented 1 year ago

Wondering when this will be merge completed?

thijssondag commented 1 year ago

Also wondering when this merge will be completed. We would love to use this!

laberg commented 1 year ago

Same here, really need this fix !

yanbodang commented 1 year ago

Don't be lazy. Please solve the problem.

ryaa commented 1 year ago

any plans to release this fix?

rifaniponk commented 1 year ago

please release this fix

filipRisteski commented 1 year ago

Any chance we can push this forward?

jroeglin commented 1 year ago

What is the reason for not releasing this fix?

Scooby27 commented 1 year ago

Looks like tests for iOS 13 and 14 are failing. Are there any updates on getting this fix published?

jroeglin commented 1 year ago

I had a very short look in the details but didn't get the failure.

filipRisteski commented 1 year ago

Logs have expired now. So what's happening?

Choppel commented 1 year ago

I am also affected by this issue. @erisu @jcesarmobile Is there an ETA on this?

Scooby27 commented 1 year ago

Are there any releases planned with this fix?

JothikannanC commented 1 year ago

I am also having the same issue, any ETA on this?

JothikannanC commented 1 year ago

who are all having this issue, please follow

cordova plugin remove cordova-plugin-screen-orientation
cordova plugin add https://github.com/apache/cordova-plugin-screen-orientation.git

this will update the plugin into latest code, and now orientation is working fine