watchOS 7.0 Complications

The Coffee Tracker sample app's complication code is set for a deployment target of watchOS 6.2 and this is a code block for a complication from the sample;

Code Block
 // Return a circular small template.
    private func createCircularSmallTemplate(forDate date: Date) -> CLKComplicationTemplate {
        // Create the data providers.
        let mgCaffeineProvider = CLKSimpleTextProvider(text: data.mgCaffeineString(atDate: date))
        let mgUnitProvider = CLKSimpleTextProvider(text: "mg Caffeine", shortText: "mg")
        // Create the template using the providers.
        let template = CLKComplicationTemplateCircularSmallStackText()
        template.line1TextProvider = mgCaffeineProvider
        template.line2TextProvider = mgUnitProvider
        return template
    }

Changing the deployment target to watchOS 7.0 will produce this error:
'init()' was deprecated in watchOS 7.0: Initializing a template without parameters is deprecated in watchOS 7.0. Use an init with parameters instead.

I have set up my own complications to supposedly align with the new init() requirements, however my complication is not showing up in the list of available options. Have I done something incorrect in this example? 

Thank you - Dan

Code Block
func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) {
        switch complication.family {
case .circularSmall:
let line1 = CLKSimpleTextProvider(text: "Run Roster")
let line2 = CLKSimpleTextProvider(text: "10 Sep 2021")
let circularSmall = CLKComplicationTemplateCircularSmallStackText(line1TextProvider: line1, line2TextProvider: line2)
handler(circularSmall)
... // more switch cases below


I found the answer wasn't in my sample template code, but with declaring which complications my app will support with watchOS7. I was not declaring my CLKComplicationDescriptor correctly but fixed it with this.

Code Block
func getComplicationDescriptors(handler: @escaping ([CLKComplicationDescriptor]) -> Void) {
let descriptors = [
CLKComplicationDescriptor(identifier: "complication", displayName: "Run Roster", supportedFamilies: CLKComplicationFamily.allCases)
// Multiple complication support can be added here with more descriptors/
// Create a new identifier for each new CLKComplicationDescriptor.
]
// Call the handler with the currently supported complication descriptors\
handler(descriptors)
}


watchOS 7.0 Complications
 
 
Q