apache / cordova-plugin-device-orientation

Apache Cordova Device Orientation Plugin
https://cordova.apache.org/
Apache License 2.0
58 stars 83 forks source link

Should deprecation status be removed? #52

Closed stefanmdt closed 3 years ago

stefanmdt commented 4 years ago

Since iOS 13, the WKWebView requires user permission when fetching DeviceOrientationEvent. When DeviceOrientationEvent.requestPermission() is called, a modal is shown that asks permission for "localhost". After app restart, the modal is shown again. Thinking of a mobile app, this is probably not the best user experience. With the device orientation plugin, this problems could be worked around, couldn't it?

breautek commented 4 years ago

Potentially related links:

https://bugs.webkit.org/show_bug.cgi?id=203287 https://trac.webkit.org/changeset/253343/webkit

arielhasidim commented 4 years ago

I also will be very happy if the deprecation status would be removed. My mobile app has navigation feature that resulted in very poor and non-native user experience since w3c/webkit protocol change (@stefanmdt described it well). I think this is also relevant for VR apps, in addition to compass feature in on-foot-navigation apps.

some related links: w3c/deviceorientation repository - Add API for requesting permission to receive device motion / orientation events #57 https://github.com/w3c/deviceorientation/issues/57

w3c/deviceorientation repository - requestPermission() and event handling clarification https://github.com/w3c/deviceorientation/issues/74

w3c DeviceOrientation Event Specification, Editor’s Draft, 20 March 2020 https://w3c.github.io/deviceorientation/#id=permission-model

apple developer forums - Unable to check DeviceOrientationEvent https://forums.developer.apple.com/thread/128376

safari 13 release notes https://developer.apple.com/documentation/safari_release_notes/safari_13_release_notes?preferredLanguage=occ

2 articles on how do you integrate the new protocol: https://medium.com/flawless-app-stories/how-to-request-device-motion-and-orientation-permission-in-ios-13-74fc9d6cd140 https://dev.to/li/how-to-requestpermission-for-devicemotion-and-deviceorientation-events-in-ios-13-46g2

UPDATE: The plugin works with my project in ios 13. @angular/cli 7.3.9 cordova-lib@9.0.1 cordova ios 5.1.1

timbru31 commented 3 years ago

The plugin has been officially revived and we are resuming development. Please note, that we can't give any ETA when a new version will be available on npm. Testing, code reviews and other contributions are of course highly appreciated.