XCode 10, WatchKit app and distribution error ITMS-90334 with com.apple.wk

I have a project with WatchKit app inside.



It used to work smooth with XCode 8 and XCode 9 with automatic signing and distribution. XCode 10 broke something.



What i have at the moment is this

https://i.stack.imgur.com/lJ4Vy.png

ERROR ITMS-90334: "Invalid Code Signature Identifier. The identifier "com.apple.WK" in your code signature for "myApp Watch App" must match its Bundle Identifier "com.myApp.watchkitapp""


The main point here is "com.apple.wk"

It has been added somewhere at the re-signing stage by the organizer as far as i can understand.

I checked my project quadriple and i'm 100% sure it doesn't contain "com.apple.wk" string anywhere.

I switched to manual signing. Created new iOS Distribution certificate. Generated 3 Provision profiles with the correct bundles for app, watch app, watchapp extension. The same error is here.


I tried to clean the project, open\close XCode, reboot the system. No luck.

I'm unable to dilever my IPA to iTunes with the error above.

I tried to export IPA and distribute it with Application Loader. No luck.



The only one place i Found "com.apple.wk" string was in packaging log


2018-09-21 06:54:33 +0000  /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app: replacing existing signature   
    2018-09-21 06:54:34 +0000  /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app: signed app bundle with Mach-O universal (armv7k (33554444:1)) [com.apple.WK]


the same time main app and extension have resigned with the correct bundle ids



2018-09-21 06:54:34 +0000  /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app: replacing existing signature
    2018-09-21 06:54:34 +0000  /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app: signed app bundle with Mach-O universal (armv7 arm64) [com.myAppBundleName]
    &
    2018-09-21 06:54:33 +0000  /var/folders/gg/jxvtgf9n07s9m0z_vzqlx0c00000gn/T/XcodeDistPipeline.4mX/Root/Payload/myApp.app/Watch/myApp Watch App.app/PlugIns/myApp Watch App Extension.appex: signed bundle with Mach-O universal (armv7k (33554444:1)) [com.myAppBundleName.watchkitapp.watchkitextension]


Any ideas how to fix the issue app are greatly appreciated.

Accepted Reply

What resolved this for us, was looking at the architecture settings of our project, and making sure that "Valid Architectures" was set to the default value.

Replies

Downloaded XCode 9 back. Built and sent app to itunes without a hassle in automatic mode. Apple what are you doing? Why you release such a buggy devtools? I spent 2 days on this issue. And still finding the way to release the app with iPhone XR and XS Max support. Since i need buildit with iOS 12 target and new assets supported. What should i do?

We've suffered this as well, no idea where com.apple.WK comes from.

I have exactly same issue and got no idea

What resolved this for us, was looking at the architecture settings of our project, and making sure that "Valid Architectures" was set to the default value.

Reseting all the targets valid architectures at build settings to

$(ARCHS_STANDARD)


fixed issue for me too.


Thank you and shame on Apple. They still unable to resolve the issue by themselves.

I'm having this exact issue with Xcode 12.1 - I didn't have it previously and was actively submitting watchOS apps during the times of this original thread.

I've checked my valid architectures and all are set to Standard.

Did anyone find any other causes or ways to get around this?
Same thing is happening to me with Xcode 12.1, does anyone has any solution? Thanks
we are also facing this issue with Xcode 12.0.1 and tried all the mentioned findings but still not working. anyone able to solve this problem?