Gamepad API does not consistently detect controllers in WKWebView

Number:rdar://FB8887166 Date Originated:2020-11-07
Status:Open Resolved:
Product:WebKit Product Version:14.2
Classification:Incorrect/Unexpected Behavior Reproducible:
When using a WKWebView (and even sometimes Safari), game controllers paired to an iPhone or iPad are not always recognized by a webpage looking for them, with no clear way to enable their functionality besides simply trying again later. When recognized, they work fine. When not recognized, it is as if they don't even exist, as far as the webpage is concerned.

To test this functionality
- Pair a Bluetooth game controller to a device (such as an Xbox One controller or DualShock 4)
- Open and run sample project on a device
- Observe that inconsistently can detect the controller (you may need to test across reboots or devices to notice this)

Sysdiagnose attached captured after loading gamepad-tester in a WebViews while an Xbox One controller was attached to an iPad Pro (11 inch, 2018). gamepad-tester did not detect the controller.

For reference:
Gamepad API:


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!