- Make sure your OS X (Mountain) Lion (10.7+) installation is up to date (Apple Menu > Software Updates).
- Make sure you have Xcode installed and it is updated to the latest version (via Mac App Store or Mac Dev Center).
- Make sure your provisioning profiles are correctly listed and set up in Xcode Organizer.
- Make sure you have a valid Mac development or release provisioning profile setup (System Preferences > Profiles).
- You should backup and/or commit (version control) your project before you continue.
- Launch Unity Entitlements Tool, click “Pick Project Directory” and select a Unity 3.4+ project top directory.
- Enable code signing, entitlements, sandboxing and packaging. Enable features you will be using.
- Click “Update” (Build Pipeline) to apply changes or click “Clear” (Build Pipeline) to remove codesign (re-build required).
Why use Unity Entitlements Tool?
Unity Entitlements Tool allows you to easily setup codesign, entitlements, sandboxing and packaging for Mac OS deployment of your Unity applications. Codesigning and sandboxing are mandatory since June 2012 if you intend to make your app available on the Mac App Store. Your application needs proper entitlements if you intend to use iCloud in your application (for example if you are using our iCloud for Unity plugin). Please note that iCloud will only be enabled for applications distributed through the Mac App Store (that is, you cannot use iCloud in a non-’Mac App Store’ app).
Unity Entitlements Tool is a free open-source software available under BSD license. You can check out the full source code at our GitHub Project Page.
How does Unity Entitlements Tool work?
Unity Entitlements Tool adds two files to your project Assets directory under the Editor sub-directory to make its magic work: entitlements.entitlements, a property list containing your application entitlements and sandboxing settings ; and PostprocessBuildPlayer, a perl script executed by Unity after each build which applies proper codesigning and entitlements to your app.
Please note that if your project directory already contains an entitlements.entitlements file under the Editor sub-directory, Unity Entitlements Tool will erase this file with new application entitlements.
Also note that if your project directory already contains a perl PostprocessBuildPlayer script, it won’t erase your script but append the codesigning commands at the end of your script. Please do not edit the added code and its marking comments as this may prevent Unity Entitlements Tool from processing this script later on.
As a sidenote, clearing the build pipeline won’t delete any file or directory. It just clears entitlements.entitlements property list from any content and removes codesigning commands from the PostprocessBuildPlayer script.
What is codesigning and how do I use profiles?
In short, codesigning is a mechanism that is primarily used for security features such as sandboxing. The main reasons that you will want to take advantage of codesigning are additional features for your application such as iCloud or simply because it is be mandatory on all Mac App Store applications since June 2012.
If you want to learn more about codesigning, you should read Apple’s Code Signing Guide.
Provisioning profiles are key to codesigning. It serves two main purposes : development profiles allow you to test and review features for your app such as In-App purchase and iCloud during development stages ; deployment profiles enable all the requested features for release purposes so you can submit your app to the Mac App Store.
If you want to learn more about provisioning profiles, you should read Apple’s App Distribution Guide.
Entitlements is a simple property list used during codesigning in order to tell it which specific features as well as security parameters (sandboxing) you are requesting for your application. You should be careful in enabling any feature your application might need in your entitlements.
If you want to learn more about entitlements, you should read Apple’s Entitlement Key Reference.
Sandboxing is a security feature already implemented in iOS since version 1.0 and that is being pushed for Mac App Store applications (it is mandatory since June 2012). Sandboxing is an operating system mechanism that isolates your app from the rest of the system and gives it only certain privileges that you told the system you would need and enforces that any unauthorized operation will be discarded.
If you want to learn more about sandboxing, you should read Apple’s App Sandbox Design Guide.
If you have issues with icon: 512×512@2x icons are required since the MacBook Pro with Retina Display is out. You can provide your own custom icon with Unity Entitlements Tool. To make that icon valid for Mac App Store distribution, you can use the terminal command iconutil as detailed in this Apple documentation under the Packaging your Icon Resources section.
If you need additional support, you can contact us using the form on the Contact page.
- FIX: Fixed certificate detection mechanism to cater for new certificate names
- FIX: Fixed invalid codesign_allocate path that prevented codesign command to function
- NEW: Recursive codesigning of plugins inside the app bundle. This is necessary for dynamic libraries but will also remove warnings for bundles upon submission to the App Store
- Fixed generated bundle permissions and ownership
- Fixed invalid entitlements by adding the now mandatory Application Identifier field
- Updated the sandboxing options
- Fixed UI stuff
- You can now pick a certificate from a provisioning profile associated to multiple certificates
- Fixed an issue with codesigning and OS X 10.7.5 (many thanks to Gordon for finding this)
- Fixed an issue with codesigning in OS X 10.8.2 (many thanks to Alessandro for finding this)
- Disabled some UI annoyance automatically overriding certain fields
- Fixed a lot of UI issues when loading the project state
- Added support for Developer ID code signing and packaging
- Fixed a few UI quirks
- Application is now signed with jemast software’s Developer ID
- Fixed potential crash issue when fetching installer certificates
- Slight modification on certificate fetching method to prevent crashes
- Implemented setting a custom certificate for packaging (productbuild)
- Small UI changes to fit new options
- Implemented settings for version number, as well as bundle “Get Info” (optional)
- Implemented optional setting for custom icon (in case you want to provide your own .icns file instead of the one generated by Unity)
- Packages generated by the PostProcess script are now ready for Mac App Store distribution
- Better PostProcess script handling to avoid breaking other PostProcess scripts
- UI changes (smaller window, textured background, fixed broken keyboard shortcuts)
- Implemented settings for the Bundle Identifier and Mac App Store category (modifies Info.plist before signing)
- Implemented provisioning profile embedding into application bundle (before signing)
- Implemented packaging for distribution
- Various fixes to provisioning profile detection and setup
- UI changes
- Initial release.