Help with Xcode 15 Watch Complication

2 years ago using Xcode 13, I created a phone app with a companion Watch app and it worked fine. This past month using Xcode 15, I created a new phone and companion app and everything is working with the following exception.

From Xcode, my new app installs on the phone and watch, but my Watch app doesn't show up in the list of apps you can use as a launch complication on one of your watch faces.

The app does show up in the launch screen for apps installed on the watch, so I assume the watch icon is generated properly. I started out using a single 1024x1024 app icon so I thought maybe I needed to create all variations of the icon before I'd see them as a complication option. I created all variations and loaded them in the Appicon asset. Still no luck.

the one major difference between my Xcode 13 and Xcode 15 projects is the 15 project includes one watch app, where the 13 project includes the watch app and a WatchKit extension. my understanding is Xcode 14 and 15 don't use WatchKit Extension.

So... what do I need to do to be able to add my Xcode 15 watch app icon to a watch face so I can launch the app from there?

Answered by darkpaw in 770199022

Where are your Watch complications stored? Are they in a WidgetKit Extension target?

When you added the Watch App target to your main iOS app, did you then add a new WidgetKit Extension (watchOS) and select to embed it inside the Watch app? That's what you need to do.

If you don't have the complications as a separate extension target, you can easily add a new one and move the code over.

I had issues with Xcode always creating iOS extensions rather than watchOS ones, but a reinstall of Xcode fixed it.

Accepted Answer

Where are your Watch complications stored? Are they in a WidgetKit Extension target?

When you added the Watch App target to your main iOS app, did you then add a new WidgetKit Extension (watchOS) and select to embed it inside the Watch app? That's what you need to do.

If you don't have the complications as a separate extension target, you can easily add a new one and move the code over.

I had issues with Xcode always creating iOS extensions rather than watchOS ones, but a reinstall of Xcode fixed it.

Thanks! No, I didn't add the WidgetKit Extension. Had no clue it was necessary.

I'll give it a shot.

Help with Xcode 15 Watch Complication
 
 
Q