Omnis Technical Note TNMC0004 December 2011

Preparing Your Omnis Application For The Mac App Store

for Omnis Studio 5
by Jason Gissing

Deprecated Content
Due to its publication date, this technote contains information which may no longer be accurate or applicable on one or more of the platforms it refers to. Please refer to the index page which may contain updated information.

(Note: Omnis Studio no longer supports deployment via the Mac App Store.)

The Mac App Store provides a new way for end users to buy and install apps onto their Mac — it is like the iTunes app store but for desktop Mac apps. To install the Mac App Store you need Mac OS X Snow Leopard (version 10.6) or higher. Once the Mac App Store is installed on your desktop Mac, buying, installing and updating apps is relatively easy. For Omnis developers, the Mac App Store is a great way to sell and distribute their Omnis apps for Mac OS X. See the Apple Developer website ( for further details about distributing your apps via the Mac App Store: you will need to register with Apple to distribute your app via the Mac App Store.

Apple has some stipulations which they require apps submitted to their Mac App store to follow. Generally, Omnis abides by these already, but there is one notable exception — Apps may only edit files which are stored in a user's Application Support section. By default, Omnis edits files within the application bundle itself, which contravenes this rule.

This tech note describes the process which enables you to format your Omnis application in a way that conforms to Apple's standards. This behavior is supported as of Omnis Studio 5.1.1.

Customizing the Application Support Folder

Locate your Omnis application bundle. Right-click it and select "Show Package Contents".

Open the Contents/Resources/English.lproj folder. Contained within this is the Localizable.strings file. Open this file in a text editor and locate the entry "CORE_RES_25600". The value of this determines the name used for your editable directory, which will be created in a user's Application Support section. You should change the value of this from "firstruninstalldest" to a name more meaningful for your application.

Localizable.strings file

Formatting the Omnis Tree

In the Omnis application bundle, browse to the Contents/MacOS folder, where the main Omnis tree is located.
Create a folder in this directory named firstruninstall.

If this folder is present, Omnis will copy its contents into
/Users/<username>/Library/Application Support/<name defined above>/
and will change its operation to assume that certain files (those which may be edited by the application) are located here rather than inside the application bundle.

As such, you must move certain folders from the root of the Omnis tree into this folder. These folders are:

  • adhoc
  • appbuild
  • convert
  • help
  • html
  • icons
  • java
  • local
  • localclient
  • secure
  • startup
  • studio
  • welcome

If you wish to use Web Services you will also need to move the 'restful' folder and its contents which is located in the clientserver\server folder:

  • clientserver\server\restful (reproduce these folders and copy/move the contents of restful)

(Note that not all editions of Omnis contain all of these folders — the following is a runtime tree with the necessary folders moved.)

firstruninstall folder

If you have any additional files or folders which are required at runtime, these should also be added, e.g. you will also need to include the restful folder, as above, if you are using Web Services.

Be aware that serial.txt is read from firstruninstalldest, so when Omnis runs like this it may not have a Web Services serial number. The solution is to place serial.txt in the firstruninstalldest folder, and make sure it has a Web Services serial number (this applies to the development version, where a Web Services serial number is required to use Web Services).

How do I find my files now?

If, at runtime, you need to find any files which are in this new editable section, you can use the sys(115) function. If Omnis contains the firstruninstall folder, this will return the path to your editable folder in Application Support. Otherwise it will return the path to the Omnis tree, inside the application bundle.

Search Omnis Developer Resources


Hit enter to search