Talk:MacOS Application Development

From RAD Studio
Jump to: navigation, search

Sandboxing Required for OS X Apps

On the Mac, you need to create a ProjectName.entitlements file and place it in the application bundle, codesign the bundle, package the bundle, and submit it to Apple. Here are the elements you need, and the relevant information from Apple:

Developing and Testing of OS X and iOS Apps and Self-distibution of OS X Apps

Developing, testing and self-distribution of OS X apps does not require you to either register or otherwise join the Apple Developer Program. Neither Xcode nor your computer need any form of registration. You will, however, need to obtain an Apple ID in order to be able to download the XCode IDE from the App Store.

iOS apps can likewise be developed and tested on the simulator without having to register for the iOS Developer Program but, to test on a device, you will need to join the iOS Developer Program.

Even though you do not need to join either the iOS or the Mac Developer Programs unless you want to test iOS apps on a device or distribute your apps via the appropriate App Store, joining does entitle you to access a wealth of developer resources otherwise unavailable.

Testing of iOS Apps on a Device and Distribution of iOS and OS X Apps via the App Store

Acquiring the Required Apple IDs

You need several IDs, available from and subject to change by Apple Computers, as follows:

Note: At XE2, only Delphi FireMonkey applications can be created for iOS. For more information, see "FireMonkey_Development_Setup_for_iOS" in the XE2 docwiki.

The developer programs for Mac and for iOS provide you with access to tutorial videos, online documentation, and support. Separate programs are available for individuals, companies, and universities, and registration for the group programs costs less per person than for an individual developer.

Sandboxing Required for OS X Apps

On the Mac, you need to create a ProjectName.entitlements file and place it in the application bundle, codesign the bundle, package the bundle, and submit it to Apple. Here are the elements you need, and the relevant information from Apple:

Codesigning and Building Your Mac Application on the Mac

These steps are required if you want to submit your application to the Mac AppStore.

Notes:

  • Ensure that you obtain a distribution certificate for submitting apps to the Mac AppStore from http://developer.apple.com/certificates.
  • You will need an Apple Developer Account to do this.
  • Ensure that the certificate is installed in your Keychain (double-click the .cer file in the Finder).
  • You will need an entitlements.xml file for Mac sandboxing.
  1. Build your application in the IDE and deploy it to Mac OS X (Snow Leopard or Lion).
  2. Open a terminal window on the Mac.
  3. Switch to the paserver's scratch-dir, for example:
    Applications/Embarcadero/PAServer/scratch-dir/machinename-profilename/
  4. Run the following commands:
Codesign your application:
sudo codesign -f -v -s "Mac Developer: FirstName LastName" "AppName.app" 
Create an installer package:
sudo productbuild --component "AppName.app" /Applications --sign "Mac Developer: FirstName LastName" --product "AppName.app/Contents/info.plist" AppName.pkg

Response

Thank you, Joanna, for your corrected information. We have incorporated your suggested changes.

Kris Houser Lead Writer, RAD Studio

RAD-10666