Bug 213467

Summary: WKWebView doesn't show motion usage description
Product: WebKit Reporter: jcesarmobile <juliosincesar>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Blocker CC: cdumez, dvpdiner2, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: iOS 13   

jcesarmobile
Reported 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.
Attachments
Radar WebKit Bug Importer
Comment 1 2020-06-23 17:49:18 PDT
youenn fablet
Comment 2 2021-01-12 02:11:40 PST
If NSMotionUsageDescription is not present, we should probably deny access.
Note You need to log in before you can comment on or make changes to this bug.