Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The application-identifier entitlement is not formatted correctly - iOS Xcode 4

I've migrated to Xcode 4, and can no longer submit my application to the App Store. Every time I submit either via Xcode or Application Loader, I get the same error:

"the application-identifier entitlement is not formatted correctly ... "

Googling this points to the Entitlements.plist file where the application-identifier key should match my application bundle ID: J1234567885.com.domain.appName for example

Thing is, it is. The bundle identifier in my app.plist and in the Entitlements.plist are identical! What am I doing wrong? Here's my Entitlements.plist file (which has never changed looking back):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>J1234567885.com.domain.appName</string>
    <key>get-task-allow</key>
    <true/>
</dict>
</plist>

I've changed the identifier above, but just to give you an idea...

like image 276
mootymoots Avatar asked Jun 16 '11 21:06

mootymoots


1 Answers

I had the same problem described by mootymoots. I solved this problem by adding a few additional params to Entitlements.plist.

I'm using TestFlight to deploy the app to a test group, so I felt it important to closely follow TestFlight's instructions for generating an IAP using Xcode 4. Completely removing Entitlements.plist seemed like a hack rather than a solution.

When I used the "New File..." wizard to create the Entitlements.plist, it generated the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>get-task-allow</key>
  <true/>
</dict>
</plist>

When I tried creating an archive, it threw the "the application-identifier entitlement is not formatted correctly ..." warning.

Through some Googling, I realized the plist needed two additional params with Xcode variables as their values. See the snippet below for the inclusion of application-identifier and keychain-access-groups. (I do not believe the latter had anything to do with the issue I was having, though)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>get-task-allow</key>
  <false/>
  <key>application-identifier</key>
  <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
  <key>keychain-access-groups</key>
  <array>
      <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
  </array>
</dict>
</plist>

Once I added these params, the archive stopped throwing the warning and I was able to distribute using TestFlight.

like image 131
Jeff Poulton Avatar answered Sep 20 '22 09:09

Jeff Poulton