how to perform action based on swipe left or swipe right on Apple TV with a Siri remote? SwiftUI Xcode 13

546 views Asked by At

I've tried the answer provided here: Detect Siri Remote swipe in SwiftUI but it seems a bit like a hack, and it produces this error:

Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value

My question is, what is the correct way to recognize a swipe gesture from the Siri remote on tvOS using swiftUI?

Many thanks in advance!

0

There are 0 answers