Ios – Invalid Code Signing Entitlements errors when loading build to iTunes Connect

application-loadercode-signingiosxcode

My iOS app has a keyboard and an app group for communication.

When I try to upload build using Application Loader, I get the following errors:

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: 'MYTEAM.iphone.MAINAPP' for the key 'application-identifier' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard'"

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard'."

ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'MYTEAM.iphone.MAINAPP' for key 'application-identifier' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."

So, obviously, application-identifier of compiled keyboard is wrong, and also it contains key aps-environment which is redundant. I don't understand why. I triple checked all identifiers in Xcode, provision profiles and app ids in membercenter. Everything is ok. I also deleted all derived data, caches, restarted Xcode several times but it didn't help.

Best Answer

Cleaning project and deleting ~/Library/Developer/Xcode/DerivedData, then rebuilding did the trick for me.

Related Topic