Two App Guys
Two App Guys > iOS4 and the wildcard

iOS4 and the wildcard

Posted by John on Jun 16, 2010, Categories: Blog

17
iOS4 and the wildcard


After much kicking and screaming, after upgrading to Xcode + iOS4 GM, I was unable to upload apps for submission to the app store. I kept getting: “The binary you uploaded 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.”

This was very annoying since I needed to resubmit fixed apps to work on iOS4.  Finally I figured it out! I am going to share my solution with you…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?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>##########.com.nuwex.appname</string>
<key>get-task-allow</key>
<false/>
<key>keychain-access-groups</key>
<array>
<string>##########.com.nuwex.appname</string>
</array>
</dict>
</plist>


I needed to edit Entitlements.plist and add specific app information–I have never had to do this before.

I replaced the 10 #’s with my app seed for my wild card provision, and bam, it worked!

Just in case, anyone needing any help with this, there you go.

Keep on coding!

Update: it appears that appcelerator-1.3.2 (1.4 RC1) still breaks Entitlements.plist

Here is how I fixed it, once and for all, I do know that I need to edit Entitlements.plist everytime.

mate ~/Library/Application Support/Titanium/mobilesdk/osx/1.3.2/iphone/builder.py

around line 763 you should see:

1
2
3
4
if not is_adhoc(appuuid):
shutil.copy(os.path.join(template_dir,"Entitlements.plist"),iphone_resources_dir)
adhoc_line="CODE_SIGN_ENTITLEMENTS = Resources/Entitlements.plist"
deploytype = "production"

simply make it look like this

1
2
3
4
if not is_adhoc(appuuid):
#shutil.copy(os.path.join(template_dir,"Entitlements.plist"),iphone_resources_dir)
adhoc_line="CODE_SIGN_ENTITLEMENTS = Resources/Entitlements.plist"
deploytype = "production"

This will prevent the build from overwriting your Entitlements.plist file again so you can continue to use the wild card, I hope by 1.4 appcelerator will just write the correct Entitlements.plist file so this is not needed.

On a positive note 1.4 rc1 shake is fixed!!!!!


Joshua says: [June 18, 2010 at 3:32 am ]

Oh man, this is great info! Thanks a lot for posting this.
But now the question is, where do I find my “app seed for my wild card provision?”
I have no memory of how I originally set my app up in iTunes connect.

John Michael Zorko says: [June 20, 2010 at 7:42 pm ]

THANK YOU! I’ve spent all morning wondering why iTC was putting the hate on me. Thank you _so_ much for this info!

Regards,

John, _very_ appreciative

John Hass says: [June 21, 2010 at 1:49 pm ]

You can find your app seed by looking under “Distribution” on the iPhone 4 Development portal.

Doney says: [June 23, 2010 at 7:52 pm ]

Hi,

I edited the builder.py file, but Titanium still gives me an Packaging Error.
What should I do? Where should I edit the Entitlements.plist file?

Thanks in advance!

Doney says: [June 24, 2010 at 10:30 am ]

Ah, already got it. Thanks ;)

User01 says: [June 26, 2010 at 8:13 am ]

Thanks very much for your post, it saved my life.

At the end of the day, I think it’s just easier to delete your Entitlements.plist and add a new one. When you do this, all the information necessary is already added to Entitlements.plist. It is appalling that Apple doesn’t make this clear, and even more appalling that their email when your app is rejected states:

“Invalid application-identifier Entitlement – This error can occur if the bundle identifier (that is, the value assigned to the CFBundleIdentifier key in Info.plist) does not match the pattern allowed by the provisioning profile you obtained from the iPhone Developer Portal. ”

Now that I know the problem, it makes half way sense, but the email should specifically tell you just to regenerate your Entitlements.plist as it’s work completely differently now!

John says: [June 26, 2010 at 2:45 pm ]

User01 you said it, but since Tony and I use appcelerator just deleting the file does not work, but Apple definitely does need to be more clear when displaying error messages.

Jeff Haynie says: [June 27, 2010 at 9:53 am ]

oops. yeah, sorry ’bout that.

in the upcoming 1.4, this is fixed along with a few others:

1. If you have an Entitlements.plist in your root project folder, we’ll use that one and won’t generate one.

2. We automatically generate the appropriate iOS4 Entitlements.plist (thanks to above) …

3. We should be working now in the various builds – ad hoc vs. distro – etc.

If you’d like to test before the final release (coming hopefully on monday), you can pull from master at http://github.com/appcelerator/titanium_mobile.

Cheers!
Jeff

Nigel Coward says: [June 28, 2010 at 10:37 am ]

I too experienced this after updating to the IOS4 SDK. All of my apps which had previously gone through without issue were now giving me the same emailed “Invalid application-identifier Entitlement” error.

I followed your initial instructions without success, then in desparation tried the suggestion by User01 of deleting the entitlements.plist file and recreating it in my projects – this worked!

As reference for any other souls out there suffering in this way, my new auto generated entitlements.plist file now looks like this:


application-identifier
$(AppIdentifierPrefix)$(CFBundleIdentifier)
keychain-access-groups

$(AppIdentifierPrefix)$(CFBundleIdentifier)

Hope this helps anyone else suffering from this annoying problem!

Nige

Phewwww says: [July 9, 2010 at 6:46 pm ]

Thank you for posting this… For about 30 minutes there, I felt like a complete n00b all over again. Thanks for saving my dignity.

LR says: [July 20, 2010 at 12:44 am ]

Indeed !!!!!
Nigel Coward post will do the trick.

It worked!

Vincent says: [August 3, 2010 at 10:52 am ]

Thank you so much for this solution!

Each time I submit my app to iTunes Connect, I have to spend a full day trying to find solutions on the web to weird errors, that turn out usually to be plainly bugs in Xcode or iTunes Connect.

For me, it was Nigel Coward’s solution that worked: recreating from scratch the Entitlements.plist file.

Note: After recreating that file, I could submit my app successfully, but then the Debug configuration was not working anymore… The new Entitlements.plist file has to be removed from the Debug configuration manually. Thanks Apple for simplifying my life…

Guyal says: [September 16, 2010 at 4:17 pm ]

Thanks for the post; this fixed my upload problem today!

Justin says: [May 3, 2011 at 5:10 pm ]

Apple finally documented the change in August 2010 (QA1710).
https://developer.apple.com/library/ios/#qa/qa1710/_index.html

Nick says: [September 16, 2011 at 4:39 pm ]

Thank you so much for posting your code. This was the final piece I needed to solve way too many hours of fail

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

My subscribers:

Subscribe via Twitter
563 Followers
Subscribe via Facebook
366 Fans
Subscribe via Email
Subscribe
Subscribe via RSS
Readers

Popular Tags

Twitter Updates