Cannot find 'CLKComplicationServer' in scope

Hi

I imported my project into Xcode 12 Beta and it seams okay except for a few things. am getting an error from a function to reload the complications.

in my ExtensionDelegate.swift file

Code Block
func reloadActiveComplications() {
print("Reloading Active Complications")
let server = CLKComplicationServer.sharedInstance() //Cannot find 'CLKComplicationServer' in scope
for complication in server.activeComplications ?? [] { server.reloadTimeline(for: complication)}
}


Im looking at the documentation here Creating and Updating Complications and trying to find the answer.

The code Apple uses on that page is

Code Block
let server = CLKComplicationServer.sharedInstance()
for complication in server.activeComplications ?? [] {
server.reloadTimeline(for: complication)
}


Looks the same to me. Can anyone tell me why this might be?

Replies

I just needed to add
Code Block
import ClockKit

Working.