hello there.
as some of you may know, application sandboxing is just a technical way to enforce the mac app store guidelines, its some kind of extension to code signing, its still a premature technology that i hope will get better with time, but for the moment apple will be enforcing its use for apps for osx lion submitted to the mac app store after november this year…
it will be a hard ride for many applications to update and become compliant if the devs want the app to stay in the mac app store
for more information on application sandboxing and code signing you can go here
fortunately unity seems to be compatible out of the box with sandboxing, as i was able to sandbox angrybots and run it without any problems
heres the pic, click for larger version:
to do it, its very simple if you are already familiar with code signing or preparing unity stand alones for mac app store submission
first you need to make an entitlements file which is basically a .plist file, in the link above theres explanations on what options and keys are available or you can make Xcode 4.1 make one for you, for that you need to make a dummy project with Xcode 4.1 and enable app sandboxing and entitlements on the projects setting.
the entitlements file that used with angrybots its the most basic and restricting one… here it is what it contains
<?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 saved that in file called AngryBots.entitlements and put it in the same folder of the built angry bots .app
then i when I’m code signing, I’ve added a couple of things to the command line , heres an example
codesign -f -s 'Mac App Certificate Name' --entitlements AppBundleName.entitlements AppBundleName.app
and thats it, the game is code signed and sandboxed, ready to be tested and packaged for the mac app store
the installer build process is the same as before
later i may do a more proper tutorial on how to prepare a unity osx stand alone for submission to the mac app store
hope this helps anyone
Cheers!