- Home /
CodeSigning Sandbox - Unity Build - MacStore
Hello,
I've finished my game, and I signed everything, packaged it and uploaded it to iTunes Connect. It keeps getting rejected due to my 'Sandbox' not being enabled.
I've been reading around a few forums, and I'm told to create a 'GameName.entitlements', and include:
<key>com.apple.security.app-sandbox</key> <true/>
I've done that, and I've placed it within my Content folder of my game.
Every time I try and code sign it with this:
codesign -f -s "3rd Party Mac Developer Application: Company" --entitlements "GameName.entitlements" "/Path/GameName.app/Contents/"
I get this error:
GameName.entitlements: cannot read entitlement data
Other people have been having this problem, and they were told to place the entitlement file on the same directory as the game, I've done that - and I still get that error.
What am I doing wrong here?
Thanks
Answer by Psymon · Jan 14, 2013 at 01:17 PM
Do the .entitlements file have the correct header ?
It should be like this :
<?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>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
I literally just copied and pasted this into the entitlements, it was the same as I had. Tried signing it via ter$$anonymous$$al. Still getting the error... Are my directories correct? The entitlements are in the same directory as my Info.plist, Resources, Data ... etc
The only thing different from you is the quotation marks above the .entitlements. When i sign i do this :
codesign -f -s "3rd Party $$anonymous$$ac $$anonymous$$pplication: $$anonymous$$y$$anonymous$$ey" –entitlements Game.entitlements Game.app
Also have you got the right on the .entitlements file ? if not make :
chmod a+rx Game.entitlements
EDIT : i didn't see but your .entitlements file should be placed in the same directory as you .app, not IN the .app
Okay - both my app and entitlements are on my desktop, I've changed my codesign to yours and now I'm getting No such file or directory:
codesign -f -s "3rd Party $$anonymous$$ac $$anonymous$$pplication: Oliver Jones" –entitlements Game.entitlements "/Users/Oliver/Desktop/"
It's normal because you didn't mention your .app file "/Users/Oliver/Desktop/Game.app"
To be sure :
First
cd /Users/Oliver/Desktop/
Then
codesign -f -s "3rd Party $$anonymous$$ac $$anonymous$$pplication: Oliver Jones" –entitlements Game.entitlements Game.app
It should be fine.
Okay, so I've done:
cd /Users/Oliver/Desktop/
Then:
codesign -f -s "3rd Party $$anonymous$$ac $$anonymous$$pplication: Oliver Jones" –entitlements Game.entitlements Game.app
And I get 'No such file or directory'. Now if I replace the '–entitlements', with a '--entitlements', I get 'cannot read entitlement data'
Answer by oliver-jones · Jan 14, 2013 at 02:38 PM
I fixed it:
codesign -f -s "3rd Party Mac Developer Application: Oliver Jones" --entitlements "/Users/Oliver/Desktop/Game.entitlements" "/Users/Oliver/Desktop/Game.app"
The main issue is that I was using '–entitlements', instead of '--entitlements'
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Distribute terrain in zones 3 Answers
Does Unity cull away unused assets on build time? 1 Answer
Onmouse event handlers preventing me from building an apk? 1 Answer
Mac App Store Validation Question 1 Answer