Bug 213469 - WKWebView motion permission prompt doesn't show app name
Summary: WKWebView motion permission prompt doesn't show app name
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-22 09:42 PDT by jcesarmobile
Modified: 2021-03-17 07:32 PDT (History)
5 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:42:41 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 app name is not shown in the permission prompt text.

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.

Instead of "" being empty, it should contain the app display name.
Comment 1 Radar WebKit Bug Importer 2020-06-23 17:49:30 PDT
<rdar://problem/64674104>
Comment 2 youenn fablet 2021-01-12 02:12:30 PST
The prompt is using the host which for custom schemes handler might be misleading or empty.
It might indeed be better to use the app name, at least if the host is empty.
We should be consistent with getUserMedia prompt.
Comment 3 David Gölzhäuser 2021-02-20 02:30:12 PST
I my opinion the getUserMedia prompt behavior is not correct either.

We have a Cordova based app using a WKWebView. When getting the userMedia the Application name is "localhost" instead of the Apps name. The Web part is running on a local webserver on the device itself.

Am I missing something?
Comment 4 Darryl Pogue 2021-03-17 07:32:28 PDT
I believe this has just been addressed as part of https://bugs.webkit.org/show_bug.cgi?id=223247