How to set name for complications?

I have created watch complication with WidgetKit for watchOS 9.

My complication works fine, but when I open watch app on iOS, and my complication is listed with name "COMPLICATION_TYPE_EDIT_LABEL_(NULL)_COMPANION".

Other preinstalled apps shows "ACTIVITY", "ALARMS", "ASTRONOMY" and so on.

Where can I set the value for this complication name?

Have you searched in the various plist to see if there is a field to fill ?

Yes, I have looked plist and build settings, and couldn't find.

I believe this is an iOS 16 or watchOS 9 bug. I submitted feedback to Apple FB11524333 (Watch companion app displays COMPLICATION_TYPE_EDIT_LABEL_(NULL)_COMPANION for new WidgetKit complications).

The resolution status is showing as open and recent similar reports is more than 10. I reported on Sep. 16.

This is what I listed in the report:

Please describe the issue and what steps we can take to reproduce it:

  1. Create new watchOS app in Xcode selecting "Watch APP with New Companion iOS App". Use default Hello World code.
  2. Add new target> watchOS> Widget Extension. Used default My Intent Widget.
  3. Run Watch App via iOS in Simulator.
  4. Open Watch companion app on iOS
  5. Navigate to add new complication to watch face.
  6. Heading above "My Intent Widget" is not the Bundle Display Name but shows COMPLICATION_TYPE_EDIT_LABEL_(NULL)_COMPANION instead. 

@brenn_t Thank you for your comments in detail. I guess we have to wait for Apple to fix the issue.

There is a solution. It comes from ClockKit framework. It’s not mentioned in new APIs, but it works.

In your watchOS target create file ComplicationController.swift with the following content:

import ClockKit

class ComplicationController: NSObject, CLKComplicationDataSource {
    func complicationDescriptors() async -> [CLKComplicationDescriptor] {
        [CLKComplicationDescriptor(
            identifier: "yourBundleID",
            displayName: "Your app name",
            supportedFamilies: CLKComplicationFamily.allCases)]
    }
    func currentTimelineEntry(for complication: CLKComplication) async -> CLKComplicationTimelineEntry? { nil }
}

Then add this field in the Info.plist of watchOS target:

key: ClockKit Complication - Principal Class, value: $(PRODUCT_MODULE_NAME).ComplicationController (String type)

I hope there will be a better solution later on.

@Alex_Vorobiev That worked for me, thanks! It seems the new WidgetKit complications still have a dependency on ClockKit for now.

@Alex_Vorobiev Thanks! This worked for me too, while WidgetKit is not complete.

Apple replied to my feedback.  This issue is resolved in iOS 16.2 beta without requiring using the workaround solution above.

How to set name for complications?
 
 
Q