Game Controller Support

SuperwallKit supports Game Controller input.

First, set the SuperwallOption isGameControllerEnabled to true:

let options = SuperwallOptions()
options.isGameControllerEnabled = true
Superwall.configure(apiKey: "MY_API_KEY", options: options);

Then forward events to your paywall by calling gamepadValueChanged(gamepad:element:) from your own gamepad's valueChanged handler:

controller.extendedGamepad?.valueChangedHandler = { gamepad, element in
  // send values to Superwall
  Superwall.shared.gamepadValueChanged(gamepad: gamepad, element: element)
  // ... rest of your code

What’s Next