I am trying to update my watchOS 2 app with complications to watchOS 3. Unfortunately I don't understand what I am doing wrong regarding the ComplicationController. I always get the following error (using Xcode 8 b6):
Type 'ComplicationController' does not conform to protocol 'CLKComplicationDataSource' Candidate has non-matching type '(CLKComplication, (CLKComplicationTimeTravelDirections) -> Void) -> ()'
Code:
class ComplicationController: NSObject, CLKComplicationDataSource {
func getSupportedTimeTravelDirections(for complication: CLKComplication, withHandler handler: (CLKComplicationTimeTravelDirections) -> Void) {
handler([.forward])
}
...
}
I also tried:
handler(.forward)
Both approaches give me an error on watchOS 3 but work perfectly fine on watchOS 2 / Swift 2. Does someone have an idea what changed in Swift 3 regarding this function?