We’are going to solve all of the following issues:
Error: WatchKit App doesn’t contain any WatchKit Extensions
Error: WatchKit Extension doesn’t contain any WatchKit apps. Verify that the value of WKWatchKitApp in your WatchKit App’s Info.plist is set to YES.
Invalid WatchKit Support – The expected app is missing from the app’s root location, such as /Payload/appname.app/Watch
Wasted 3 days with the above errors & issues. To solve those, I’ve modified the extension identifier so that it has watchkit’s identifier as prefix. This is because, unless identifiers are prefix, those won’t be allowed to embed on Xcode settings.
1. In main iOS app settings on general tab, add your watchkit app in the embedded binaries section. Note that, if you ever deleted build folder, the embedded watchkit app may not be displayed in this section even if you just added there.
2. Make sure you see the watchkit app both in target dependancy & embedded binaries section. If not, add them on the build phases tab of your iOS app.
3. Now on settings of watchkit app, add your extension in the embedded binaries.
4. You should see the watchkit extension both in target dependancy & embedded binaries section. If not, add them on the build phases tab of your watchkit app.
5. On build settings of the extension, make sure bitcode is enabled. Base sdk should be latest iOS sdk.
6. See the watchkit app identifier is a prefix of the extension. I’ve renamed the product module (both for watchkit app & extension) to avoid spaces.
You should now be able to build or archive with proper mobile provisions. By the way, my Xcode version is 9.3 & I’m using Objective C.