9

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...

Rui Peres
  • 25,741
  • 9
  • 87
  • 137
mootymoots
  • 4,545
  • 9
  • 46
  • 74

4 Answers4

9

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.

Jeff Poulton
  • 6,032
  • 1
  • 21
  • 12
6

Turns out now in Xcode 4+ you do not need an Entitlements.plist for your Release build (or at least, Xcode 4 does something weird with it that Xcode 3 didn't).

Anyway, to fix my issue I simply removed the reference to my Entitlements.plist from the release parameter under 'Code Signing Entitlements' in Build Settings.

Built, Archived, Validated, Submitted to iTunes Connect.

Rui Peres
  • 25,741
  • 9
  • 87
  • 137
mootymoots
  • 4,545
  • 9
  • 46
  • 74
  • 1
    I would check your binary details for your application on the iTunesConnect. You need it set to get-task-allow = FALSE for release builds. – jschmidt Jun 20 '11 at 10:57
1

In my case, this was caused by using a wildcard app id for the distribution provisioning profile (com.mycompany.*). Replacing it with a provisioning profile using an absolute app id solved the issue.

Matt
  • 412
  • 7
  • 17
0

In Xcode 4, your entitlements file should not contain the application identifier. Only on your Target -> Summary tab. Also, get-task-allow should be set to False for AppStore submission.

To fix, I would delete your current entitlements.plist file and create a new one using File -> New -> New File. Just use the key get-task-allow = FALSE and try that. Make sure you put your application identifier on the Target -> Summary tab.

jschmidt
  • 2,898
  • 3
  • 24
  • 27
  • OK, so I have get-task-allow to false. Target->Summary is the full bundle identifier. Now I get the same error, but just quoting J1234567885.* ? – mootymoots Jun 17 '11 at 06:05
  • Did you try deleting the actual entitlement file first and then creating a new one? – jschmidt Jun 17 '11 at 13:20