Xcode 14: WatchKit App doesn't contain any WatchKit Extensions

I am trying to add a watch extension to my existing iOS app. I added a new watch target and I see the new single watch app folder (no extension folder anymore).

I also added the watch target as a dependency (embedded content / target dependency) to my app target.

I also made sure the bundle identifier of the watch target matches the apps identifier + .watchkitapp

But when I try to archive the app and choose validate, I get the error that the watch info.plist is missing the WKWatchKitApp property. So I add it via the Info tab on the watch target. (Which creates a new info.plist file that only contains this single property)

When I try again, the build fails with this:

Error (Xcode): WatchKit App doesn't contain any WatchKit Extensions. Verify that the value of NSExtensionPointIdentifier
in your WatchKit Extension's Info.plist is set to com.apple.watchkit.

So I add

<key>NSExtension</key>
    <dict>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.watchkit</string>
    </dict>

to the watch info.plist but the build error remains. I am a bit lost here, as all questions and tutorials refer to the old Xcode style.

Yes, the format has changed. See the WWDC videos on this.

Single-target watch apps get WKApplication, not WKWatchKit App. Watch apps have not been extensions since watchOS 1; the WatchKit App + WatchKit Extension two-target system was a holdover from that time, but functionally all the code in those two targets was treated as a single Watch app by the OS.

What do you mean by "I also added the watch target as a dependency (embedded content / target dependency) to my app target."?

Xcode 14: WatchKit App doesn't contain any WatchKit Extensions
 
 
Q