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."
I was creating an .ipa file from archive with help of command line:
xcodebuild -exportArchive -archivePath $’MyAppArchive.xcarchive’ -exportPath $”MyApp” -exportFormat ipa -exportProvisioningProfile Provisioning_Profile_Name
With only one provisioning profile specified. That was the problem.
Problem could be solved if one specify both profiles for app and for keyboard (stackoverflow question). Or you can simply create .ipa using Xcode, as I did.