timbru31 commented on a change in pull request #70: URL: https://github.com/apache/cordova-plugin-device-motion/pull/70#discussion_r476547976
########## File path: README.md ########## @@ -27,12 +27,172 @@ description: Access accelerometer data. # cordova-plugin-device-motion +# Usage Notice + +With the [W3C Device Orientation API](https://www.w3.org/TR/orientation-event/), Android, iOS, and Windows devices may not need this plugin anymore. + +However, for iOS 13+, a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) is required. Apple does not allow access to the device’s motion or the permission request from an insecure browsing context. + +If you use a custom scheme, i.e., the `app` protocol, for your iOS app, the browsing context is considered insecure. To solve this problem and be able to use the device motion feature, this plugin will be necessary on iOS 13+. Review comment: ```suggestion However, for iOS 13+, a [secure context](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) is required. Apple does not allow access to the device’s motion or the permission request from an insecure browsing context. Locally-delivered resources such as those with http://127.0.0.1 URLs, http://localhost URLs (under certain conditions), and file:// URLs are also considered to have been delivered securely. If you use a custom hostname, i.e., something else than `localhost`, for your iOS app, the browsing context is considered insecure. To solve this problem and be able to use the device motion feature, this plugin will be necessary on iOS 13+. ``` How about this? I'd like to avoid gambling's about Tim Apple's future decisions if they forgot to check the protocol or not. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
