DualShock 4 not showing up?

This presentation from WWDC2019 says that DualShock 4 controllers should now work through GameController:


https://developer.apple.com/videos/play/wwdc2019/616/


I have an iPad Pro 2nd gen running iOS 13.2, with DualShock 4 connected via bluetooth (confirmed in the Settings app), and yet when I call [GCController controllers] from my code, the array that I get back has zero entries. Does anybody have any ideas why this might not be returning my controller?


Thanks!

Replies

I just got one of these and started working with it. It seems to take a little time for the controller to appear and if the first call to [GCController controllers] is near the beginning of app launch, you might get an empty list. Register for the connect/disconnect notifications and the program will be informed shortly when the controller shows up.

Post not yet marked as solved Up vote reply of bg2b Down vote reply of bg2b