Archive error: WatchKit Extension doesn't contain any WatchKit apps

With great effort, I managed to build one of my Apple Watch capable apps with both the WatchKit 1 targets for running on iOS 8.4 and the WatchOS 2 targets for running on iOS 9. I can debug the app on a physical iPhone and Apple Watch running 8.4 as well as debug on the 9.0 simulators for iPhone and Watch.


However, when I archive the project, ValidateEmbeddedBinary throws the 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.


I dug down into the derived data build artifacts, drilling into the packages and it clearly shows the Info.plist for the WatchKit app having WKWatchKitApp set correctly. I have checked that each of the 5 target Info.plist are being built from the correct folders.


I have a shell of a dual watchkit app that archives just fine. Comparing the 5 plists in the shell to my fulll app shows no differences. Same issue whether running Xcode 7 GM or beta 6.

Adding WKWatchKitApp to the WK1 extension's Plist did not make any difference. Removing WKWatchKitApp from the WatchOS2 extension also did not help. It's not clear whether this setting is needed in both targets


I filed bug 226452134 with Apple. Since they haven't looked at another related bug report regarding dual build watchkits that I filed over 3 weeks ago, I don't expect any resolution to this one soon.

Replies

Have you had any resolution on this? I'm having a very similar problem.

I have exactly the same problem. If this is a bug, I really hope Apple engieers will take some actions to it.

Same problem here. Built fine with XCode 6.4 but comes up with this error when archiving with xcode 7

Same problem. Archive in Xcode7 doesn't work.


Does anyone found a workaround?


Update:

After many hours of poking with this.. here is what (sort of) worked for me:

1. Manually set Release provisioning profile for watchkit extension and watchkit app

2. try archiving again.

3. if fails, set provisioning profiles back to automatic and try archiving again.

4. if still fails, go back to 1.


It's not like provisioning settings are wrong (it fails both on "auto" and "manual"). It seems that sometimes something gets stuck deep within Xcode and archiving fails with this error. Toggling provisioning settings seems to "unstuck" it for exactly one Archive build (then it just keeps failing with the same error again). But that one successful build passes all store validations and works fine on device via testflight.


PS: Since my app only has watchos1 target, I've tried making an archive on Xcode 6.3 and it worked. Consistently. Which makes me believe that this is Xcode 7 problem.

Having the same issue all of a sudden. It has never given me this error before but starting yesterday, no matter what I do this creeps up. My WatchKit target's name is not the same as the main app (as some have suggested changing it on stackoverflow). Yet, it won't archive. Build works fine and I am able to debug it. Archiving would work randomly at times but now it's constantly giving me this error.

I'm having the exact same issue here. Have to ship an app update today; looks like this one is going out the door without the watch app.

I'm having the same problem. I have not found a workaround.

I've got the same problem, can you give the link to your Apple radar bug report ? so we can follow the issue.


Thank-you.

I updated to 7.0.1 of XCode just now and tried to add back the watchkit extension to the embedded binaries on my parent app; but the issue still persists.

I was able to compile my App with wachOS (1.0) extention with Xcode 6.4, and I juste submit it to iTunes Connect. I hope it will be validated ...

I'm getting the same problem here. The build works fine, but the archiving fails. Version 7.0 (7A220)

Exact same thing here. Had the issue, tinkered a bit, an archicing went right, but came back at the next archving and won't go away. Apple have always made release of iOS apps extra painful, but this is getting ridiculously buggy.

Ok, at the end I spent a few hours implementing every solutions found on the net.


It finally worked, after around 100 separate archiving.


What worked:


Check out of the project in a new folder + removing spaces from app extension and watch app names + build + change of build number + crash of xcode + build (failed), immediately followed by a build that passed.


This is completely cargo cult. There probably is some transient error / race condition somewhere. I have no idea what triggers it.


After having uploaded the build, I changed the build number and archived. It failed 5 times in a row.

Same problem here Xcode 7.1. WKWatchKitApp set correctly and we've pushed this app to the AppStore previously but now with v7.1.

XCode 7.1 the same problem. XCode 7.0 before worked fine.