These annoying errors when uploading to Apple App Store can be avoided.
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: ‘true’ for the key ‘get-task-allow’ in ‘Payload/_ /_'”
ERROR ITMS-90046:”Invalid Code Signing Entitlements. Your application bundle’s signature contains code signing entitlements that are not supported on iOS. Specifically, value ‘development’ for key ‘asp-environment’ in ‘Payload/_ /_’ is not supported.”
Here’s how I solved it:
Instead of using the highlighted “Upload To App Store…” button of the Xcode Organizer window, I clicked the “Export” button, and selected App Store on the next screen. This placed the .ipa object of my app in a folder named ‘app’ date/time on my desktop. Then I used the Application Loader, (Xcode > Open Developer Tool > Application Loader) and no more nasty errors!