title: ERROR ITMS-90164/90046: Invalid Code Signing Entitlements
body: <p>Note: I'm developing using Xamarin. Similar question posted in Xamarin Forum <a href="http://forums.xamarin.com/discussion/31491/invalid-code-signing-entitlements#latest" rel="noreferrer">here</a></p>
  
  <p>I'm creating an app called, say <strong>CompanyApp</strong>. Then I created an App ID for it <strong>com.Company.CompanyApp</strong>, along with Distribution Provisioning Profile that uses the corresponding App ID. I uploaded the binary and it worked perfectly fine.</p>
  
  <p>Then I went on create a demo version of the app (basically the same app with small modification, so it's the same solution &amp; project, just different bundle signing setting), <strong>CompanyAppDemo</strong> with a new App ID <strong>com.Company.CompanyAppDemo</strong>, along with a new Distribution Provisioning Profile that uses the new App ID. I updated the iOS Bundle Signing options to use the new Provisioning Profile and generated the IPA. But when I uploaded this to Application Loader, I got the following error:</p>
  
  <blockquote>
    <p>[2015-01-23 16:08:21 SGT] ERROR: 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: 'TEAMID.com.Company.CompanyApp' for the key
    'application-identifier' in 'Payload/CompanyApp.app/CompanyApp'"</p>
    
    <p>[2015-01-23 16:08:21 SGT] ERROR: ERROR ITMS-90046: "Invalid Code
    Signing Entitlements. Your application bundle's signature contains
    code signing entitlements that are not supported on iOS. Specifically,
    value 'TEAMID.com.Company.CompanyApp' for key 'application-identifier'
    in 'Payload/CompanyApp.app/CompanyApp' is not supported. This value
    should be a string starting with your TEAMID, followed by a dot '.',
    followed by the bundle identifier."</p>
  </blockquote>
  
  <p>I have been debugging for days to figure out to no avail.</p>
  
  <p>I am wondering why when I signed with the new
  profile, the error that Application Loader threw refer to the ID of the original <strong>TEAMID.com.Company.CompanyApp</strong> instead of <strong>TEAMID.com.Company.CompanyAppDemo</strong>? Is this a bug in Xamarin that pick up a wrong provisioning profile or am I missing something? You don't need different certificate for different app right?</p>
  
  <p>Note that I have always refreshed the Provisioning Profile list in XCode > Preference before changing the iOS Build Signing option in Xamarin.</p>