Sandboxing Your Mac OS X Application Manually
Go Up to Mac OS X Application Development
- Note: Using the IDE is the recommended way to sandbox. Manual steps are much more complex than using the IDE, and are only outlined here for those who need to work outside the IDE.
If you are not using the RAD Studio IDE to create a sandboxed application package of a Mac OS X application, you can do the necessary steps on your Mac. This section presents a basic introduction to this process, but for details you should rely on the Apple documentation (some links are provided here).
On the Mac, you need to create a <project>.entitlements file and place it in the application bundle, code-sign the bundle, package the bundle, and submit it to Apple.
Requirements from Apple
Here are the elements you need, and the relevant information from Apple:
- The associated <project>.entitlements file.
- code-sign:
- man page for code-sign command
- Code Signing Guide
- Code Signing Your App
- For example:
codesign -s"Certificate Name" -f "Application Bundle Name"
- productbuild
- installer (for testing the installation of your application)
Manually Code Signing and Building Your OS X Application on the Mac
Code signing and provisioning are required if you want to submit your application to the Mac App Store. You can perform these steps either using the IDE (as described earlier in this topic), or manually (by following the general directions given below).
Notes:
- Ensure that you obtain a distribution certificate for submitting apps to the Mac App Store.
- You will need a <project>.entitlements file for Mac sandboxing.
To manually code sign and build a product installer for your Mac OS X application:
- Build your application in the IDE and deploy it to Mac OS X.
- Open a terminal window on the Mac.
- Switch to the paserver's scratch-dir:
Applications/Embarcadero/PAServer/17.0/scratch-dir/machinename-remoteprofilename/
- Run the following commands:
- Code-sign your application:
sudo codesign -f -v -s "Mac Developer: FirstName LastName" "AppName.app"
- Do a productbuild, creating an installer package:
sudo productbuild --component "AppName.app" /Applications --sign "Mac Developer: FirstName LastName" --product "AppName.app/Contents/info.plist" AppName.pkg
- Code-sign your application:
See Also
- Sandboxing Your Mac OS X Application using RAD Studio
- OS X Roadmap for Mac App Store