iOS4 and the wildcard
Jun 16, 2010
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…
<?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:
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
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!!!!!
Comments: 14


14 comments
Joshua
Jun 18, 2010
03:32:18
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.
//do something here
Jun 18, 2010
17:10:18
[...] not appear to be mentioned or documented anywhere. Thanks to the TwoAppGuys and their blog entry iOS4 and the wildcard for the solution to this [...]
John Michael Zorko
Jun 20, 2010
19:42:17
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
Jun 21, 2010
13:49:40
You can find your app seed by looking under “Distribution” on the iPhone 4 Development portal.
Doney
Jun 23, 2010
19:52:35
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!
iPhone SDK 4 and the frayed ends...
Jun 24, 2010
02:51:29
[...] asked in the developer forums, but no answers. I kept looking. Finally I came across this blog by TwoAppGuys with a possible answer. I tried the solution outlined on the blog and voila, behold a successful [...]
Doney
Jun 24, 2010
10:30:44
Ah, already got it. Thanks
User01
Jun 26, 2010
08:13:05
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
Jun 26, 2010
14:45:41
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
Jun 27, 2010
09:53:17
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
Jun 28, 2010
10:37:40
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
Jul 9, 2010
18:46:12
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
Jul 20, 2010
00:44:56
Indeed !!!!!
Nigel Coward post will do the trick.
It worked!
Vincent
Aug 3, 2010
10:52:56
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…
Leave a Comment