title: Delphi XE4 and iOS Application Loader complaining "This bundle is invalid"
body: <p>I can not pick a correct <strong>CFBundleIdentifier</strong> value it seems.</p>
  
  <p>...</p>
  
  <p>in KeyChain I have this certificate:</p>
  
  <pre><code>iPhone Distribution: ExampleCompany (DistCertificateID)
  </code></pre>
  
  <p>In my developer.apple.com account I have defined app:</p>
  
  <pre><code>Name: LongReadableName 
  Prefix: DistCertificateID 
  ID: com.example.*
  
  Name: Xcode iOS Wildcard App ID
  Prefix: DistCertificateID 
  ID: *
  </code></pre>
  
  <p>In <strong>iTunesConnect</strong> I have name SkuID + BundleID <strong>appname</strong></p>
  
  <p>...</p>
  
  <p>I have then tried to enter and deploy with following values with different error messages:</p>
  
  <ul>
  <li>appname</li>
  </ul>
  
  <blockquote>
    <p>This bundle is invalid. The application-identifier entitlement is not
    formatted correctly; it should contain your 10-character App ID Seed,
    followed by a dot, followed by your bundle identifier:
    <strong>0000000000.appname</strong></p>
  </blockquote>
  
  <ul>
  <li>DistCertificateID.appname</li>
  </ul>
  
  <blockquote>
    <p>The Bundle ID <strong>DistCertificateID.appname</strong> defined in your Xcode
    Project does not match the Bundle ID that you entered for this app in
    iTunes Connect <strong>appname</strong>.</p>
  </blockquote>
  
  <ul>
  <li>DistCertificateID.com.example</li>
  </ul>
  
  <blockquote>
    <p>The Bundle ID <strong>DistCertificateID.com.example</strong> defined in your Xcode
    Project does not match the Bundle ID that you entered for this app in
    iTunes Connect <strong>appname</strong>.</p>
  </blockquote>
  
  <ul>
  <li>DistCertificateID.com.example.*</li>
  </ul>
  
  <blockquote>
    <p>The Bundle ID <strong>DistCertificateID.com.example.*</strong> defined in your Xcode
    Project does not match the Bundle ID that you entered for this app in
    iTunes Connect <strong>appname</strong>.</p>
  </blockquote>
  
  <ul>
  <li>DistCertificateID.com.example.appname</li>
  </ul>
  
  <blockquote>
    <p>The Bundle ID <strong>DistCertificateID.com.example.appname</strong> defined in your Xcode
    Project does not match the Bundle ID that you entered for this app in
    iTunes Connect <strong>appname</strong>.</p>
  </blockquote>
  
  <ul>
  <li>com.example.appname</li>
  </ul>
  
  <blockquote>
    <p>The Bundle ID <strong>com.example.appname</strong> defined in your Xcode
    Project does not match the Bundle ID that you entered for this app in
    iTunes Connect <strong>appname</strong>.</p>
  </blockquote>
  
  <p>I think I have tried everything I could think of... </p>
  
  <p>I speculate if the issue could be resolved by a different iTunesConnect configuration/upload although I have now idea at present how to create one that would solve the problems listed here. But just in case, I have create a specific SO for BundleID/iTunesConnect: <a href="https://stackoverflow.com/questions/18019287/ios-app-bundle-id-errors-and-itunesconnect">iOS app Bundle ID errors and iTunesConnect</a></p>
  
  <p><strong>Newest update #1</strong></p>
  
  <p>I decided to drop using wildcard app IDs since I can see that has caused other people problems. Hence I chose the other option in iTunesConnect resulting it in showing me BundleID as being <strong>com.example.appname</strong>. I then made sure 1) my provisioning for distribution used <strong>DistCertificateID.com.example.*</strong> 2) to set CFBunldeIdentifier (in Delphi) as same shown in iTunesConnect. I then built and deployed followed by submitting it to Application Loader. That resulted in error message:</p>
  
  <blockquote>
    <p>The Bundle ID <strong>com.example.appname</strong> defined in your Xcode Project
    does not match the Bundle ID that you entered for this app in iTunes
    Connect <strong>com.example.appname</strong>.</p>
  </blockquote>
  
  <p>As you can see, the bundle ID is now the same, but still it complains. I do not understand why :(</p>
  
  <p><strong>Newest update #2</strong></p>
  
  <p>I actually made a small typo error last night when I tried above. Guess I was too tired. Above solution works! (I will make it an answer.)</p>