Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

AppleTV Simulator SiriRemote not working in App

Hi,

I'm having a small App in the AppleTV-Simulator which is supposed to use the Siri-Remotes Swipe-Gesture.

It works perfect on the real device but on the simulator the Swipe-Gesture is not recognized in the App but it works on the Start-Screen of the Simulator using the simulated Siri-Remote app.

Here is the code which sets up the xAxis ans yAxis value change handlers:

     #if targetEnvironment(simulator)
             // Simulator
            let siriRemote = GCController.controllers().filter { controller in
                if controller.vendorName == "Gamepad" {
                    return true
                } else {
                    return false
                }
            }
            
            let sController = siriRemote.first!
            
            let inputProfile = sController.physicalInputProfile
            
            let dPad = inputProfile.dpads["Direction Pad"]
            
            self.dPad = dPad
            self.dPad!.xAxis.valueChangedHandler = self.directionPadXAxisValueChangeHandler
            self.dPad!.yAxis.valueChangedHandler = self.directionPadYAxisValueChangeHandler
                   }
                #else
                    // Device
                    if let _ = ( notification.object as? GCController)?.microGamepad {
                        let microProfileController = notification.object as! GCController

                        self.microGamePad = microProfileController.microGamepad
                        self.dPad = self.microGamePad!.dpad

                        self.dPad!.xAxis.valueChangedHandler = self.directionPadXAxisValueChangeHandler
                        self.dPad!.yAxis.valueChangedHandler = self.directionPadYAxisValueChangeHandler
                    }
                #endif

Any help is greatly appreciated.

Cheers,

Frank

AppleTV Simulator SiriRemote not working in App
 
 
Q