Project builds failing with error: Watch-Only Application Stubs are not available when building for watchOS Simulator. (XCode 14)

I am attempting to build (and create an archive of) a standalone watchOS application. I am using the latest Xcode 14, but the project stopped building at some point, whereas both the simulator and previews in the canvas were working previously (in the same Xcode version).

The error message is Watch-Only Application Stubs are not available when building for watchOS Simulator., but I cannot find the solution to it. The build crash log does not open providing more detail.

Interestingly, the project builds in Xcode 13 but does not produce the iOS archive but a watchOS archive.

I do not know how to proceed from this point on, any help would be appreciated.

I have seen this error message once before. Let's try to get this fixed for you.

I know this is a Watch-only app, but there is still an iOS stub in your project that allows you to publish your app on the App Store. If you look at the targets in your project, you should see your Watch app target, possibly a WatchKit Extension target (if you created the app before Xcode 14 and haven't already converted the app to be a single-target Watch app), and another target that is the iOS stub. Click that one to look at the settings.

Look at the Build Phases tab and expand the "Embed Watch Content" section. Your Watch app should be in that list. If it isn't, this is your problem. Click the "+" button and add it. You want the ".app" item from the Products folder.

I hope this helps!

For Xcode 15 we also face the same issue building for physical watch, what we do was to remove the watchOS in the Support destination

also we disable ENABLE_USER_SCRIPT_SANDBOXING

under build setting IOS deployment target to 13.0 WatchOS deployment target 10.2

Project builds failing with error: Watch-Only Application Stubs are not available when building for watchOS Simulator. (XCode 14)
 
 
Q