Bug 216191
Summary: | Bluetooth Game Controllers Unresponsive in Progressive Web Application on iOS 14 Beta 7 After Closing the App | ||
---|---|---|---|
Product: | WebKit | Reporter: | goehdavi |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Critical | CC: | beidson, webkit-bug-importer |
Priority: | P1 | Keywords: | InRadar |
Version: | Other | ||
Hardware: | iPhone / iPad | ||
OS: | Other |
goehdavi
Bluetooth game controllers become unresponsive (and not registered by the javascript) in Add to Home Screen (Progressive Web) apps after closing the app after the game controller is connected. The only way to get out of this state is by turning off and then turning on the game controller while the PWA is open. Strangely, turning off and then turning on the game controller while the app isn't open doesn't fix the issue, the app needs to be open. The game controller is connected over bluetooth as shown by the settings app. Turning the iPhone on/off also fixes the issue. The issue doesn't appear if the app is kept open and just moved from the foreground to the background and back.
Steps to reproduce:
1. Connect game controller
2. Open "Add to Home Screen"/PWA app that has game controller API support
3. Verify controller inputs work
4. Close the PWA without disconnecting the controller
5. Open the PWA
6. Verify game controller inputs don't work no matter what button is pressed
7. Close the PWA
8. Turn the controller on/off
9. Open the PWA
10. Verify game controller inputs don't work no matter what button is pressed
11. Leave app open
12. Turn the controller on/off
13. Verify controller inputs work
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/68370340>
Brady Eidson
I only have an iOS 14 Beta 6 device handy for testing RIGHT NOW... but I just verified with a PS4 controller and a "Save to Homescreen" website that it works fine.
In your steps:
(In reply to goehdavi from comment #0)
> Steps to reproduce:
> 1. Connect game controller
> 2. Open "Add to Home Screen"/PWA app that has game controller API support
> 3. Verify controller inputs work
> 4. Close the PWA without disconnecting the controller
> 5. Open the PWA
> 6. Verify game controller inputs don't work no matter what button is pressed
The controller appears and works fine right here^^
> 7. Close the PWA
> 8. Turn the controller on/off
> 9. Open the PWA
> 10. Verify game controller inputs don't work no matter what button is pressed
Ditto ^^^
> 11. Leave app open
> 12. Turn the controller on/off
> 13. Verify controller inputs work
I'll update to a beta 7 device soon-ish and try again... but I *strongly* doubt I'll see a difference, based on the change rate between those two betas.
---
Since our experiences are so drastically different, could you please provide *an exact URL* of what you're testing with, and the exact controller you're testing with? (I probably have it lying around)
goehdavi
When you "Close" the app, can you ensure it is is fully closed in the app switcher?
goehdavi
I am also using an Xbox One controller.
Brady Eidson
(In reply to goehdavi from comment #3)
> When you "Close" the app, can you ensure it is is fully closed in the app
> switcher?
Like "swipe up to close it"
Yup.
goehdavi
Looks like when we are in this state the gamepad info metadata is missing. It no longer identifies itself as an xbox or playstation controller and no gamepad mapping is supplied.
Brady Eidson
(In reply to goehdavi from comment #6)
> Looks like when we are in this state the gamepad info metadata is missing.
> It no longer identifies itself as an xbox or playstation controller and no
> gamepad mapping is supplied.
That's a different bug, resolved here - https://trac.webkit.org/changeset/265644/webkit
That fix NOT in an iOS14 beta so it's expected you'd see it.
FWIW, *all* controllers on iOS will always be "standard"
But you can still see inputs right?
goehdavi
Yep. Looks like we couldn't identify the controller and hence no inputs. Thanks for the quick response on this. Is the other fix going to be included in an upcoming iOS beta?