6

I've been using Apple's GameController framework so far, but there's no possibility to make the controller vibrate. I'm searching for something similar to Unity's Handheld.Vibrate(), but the last hours of research make me believe there's no simple API.

Is it somehow possible to make a Game Controller paired to macOS/iOS vibrate using Xcode? (Perhaps through directly sending signals to the controller)

2
  • The thing you are looking for it’s called UIFeedbackGenerator. On Apple documentation you can find examples how to simulate. Jan 23, 2020 at 20:08
  • UIFeedbackGenerator is used to create haptic feedback on iOS devices. However, I'm looking for a way to make a Game Controller vibrate/rumble on macOS.
    – Valentin
    Jan 24, 2020 at 10:52

3 Answers 3

3

Apple's response to my feature request via Feedback Assistant:

Thanks for your feedback! For now, this issue behaves as intended.

We love rumble in the Xbox Wireless Controller and Sony DualShock4 controllers, too - we think it would be great in games on iPhones, iPads, tvOS, and macOS, too.


Looks like this is finally possible! There’ll be a talk about this on Wednesday. I will update this answer as soon as it’s available.

2
+150

According to Apple's Game Controller Programming Guide, this is not a supported way of interacting with controllers.

Understanding the Controllers Supported by Apple

Apple has created specifications for distinct kinds of MFi game controllers.

Although specific controllers vary, many common characteristics must be implemented strictly according to the specification.

The extended control layout contains the following controls:

  • Four analog face buttons arranged in a diamond on the right side of the controller (labeled A, B, X, and Y)
  • An analog directional pad on the left side of the controller
  • Two analog thumbsticks on the left and right sides of the controller
  • Two analog shoulder buttons (labeled L1 and R1)
  • Two analog triggers (labeled L2 and R2)
  • A button to pause and resume gameplay

The Siri Remote has its own micro control layout.

  • An analog directional pad on the top of the remote
  • Two digital buttons (A,X)
  • One button to pause and resume gameplay

If you directly communicate with a given controller over Bluetooth or similar, you could directly issue controller-specific commands (such as vibrate). Obviously, this would be vastly more complex as you would essentially have to re-implement the GameController framework yourself, listening to commands in an event loop and responding to these in your app. Communication protocols to the controllers likely varies between different makes and models as well, adding even more complexity and cost to the development.

Your best bet is to submit a feature request directly to Apple, via Feedback Assistant.

2
  • 1
    This is about as far as I've gotten too. I'll wait with accepting in hope of more detailed instructions on communicating with the controller directly. Will edit question to better communicate this.
    – Valentin
    Jan 26, 2020 at 14:50
  • 1
    @ValentinWalter there is some rumble logic for Xbox controllers in this repository, but I'm not sure if this would work at the application level (and there's a pretty restrictive GPL licence). Jan 26, 2020 at 15:01
1

It's coming to iOS 14 to support haptic feedback from the third party controllers. https://developer.apple.com/videos/play/wwdc2020/10614/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.