Bug 213467 - WKWebView doesn't show motion usage description
Summary: WKWebView doesn't show motion usage description
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 13
: P2 Blocker
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-22 09:31 PDT by jcesarmobile
Modified: 2021-03-16 11:01 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jcesarmobile 2020-06-22 09:31:33 PDT
If you have a Cordova app that uses WKWebView and devicemotion events, since iOS 13 it's required to request motion permissions with DeviceMotionEvent.requestPermission(), but the configured NSMotionUsageDescription is not shown and that causes App Store rejection.

See sample app

https://github.com/jcesarmobile/cordova-requestPermission-issue

run
cordova prepare
open platforms/ios/HelloCordova.xcworkspace
and run from Xcode on any iOS 13 device
click "Access DeviceMotions" and the prompt shows "" Would Like to Access Motion and Orientation. But not the configured NSMotionUsageDescription.
As there is no NSMotionUsageDescription shown, Apple rejects the app because of their own bug.

see reported issue where the user claims that the app was rejected because of that https://github.com/apache/cordova-ios/issues/891

I would expect that the app shows the configured NSMotionUsageDescription text or that Apple doesn't reject apps because of that.
Comment 1 Radar WebKit Bug Importer 2020-06-23 17:49:18 PDT
<rdar://problem/64674101>
Comment 2 youenn fablet 2021-01-12 02:11:40 PST
If NSMotionUsageDescription is not present, we should probably deny access.