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.

Replies

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."?

  • Was seeing same message "watchkit app doesn;t contain any watchkit extensions," error, then i replaced WKWatchKit in watch target's info.plist to WKApplication, error is gone. App is working but doesn't install watch app simultaneously.

    Watch app when installed from xcode separately on watch works.

    And even deleting the main app on iphone removes the watch app. But it is not installing on watch when installing ios app on device and simulator both.

  • Later, i created a new project in xcode for watch with companion app together. And it was also showing same behaviour i.e. watch app not installing with ios app. Then, uploaded my app to testflight and installed. It installed the watch app automatically after installing ios app. Is this okay behaviour? Will it also do the same on app store?

Add a Comment