Sandboxing Your macOS Application Manually

From RAD Studio
Jump to: navigation, search

Go Up to 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 an 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:

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:

To manually code sign and build a product installer for your OS X application:

  1. Build your application in the IDE and deploy it to OS X.
  2. Open a terminal window on the Mac.
  3. Switch to the paserver's scratch-dir:
    Applications/Embarcadero/PAServer/18.0/scratch-dir/machinename-remoteprofilename/
  4. 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

See Also