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

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