Starting with Xojo 2014 Release 2, you can easily specify your own custom plist settings for your OS X apps.
Adding to a plist
Apps built for OS X consist of an “application bundle”. This bundle contains the app itself, resources and other components such as frameworks. It also contains an “Info.plist” file, which is an XML file containing specific settings that tell OS X about your application.
For certain apps, you may need to modify the plist to enable features, such as for UTI and Retina.
To make it easier for you to include your own settings in the application plist file, you can create your own Info.plist file with the specific settings you need and drag it into your project.
When your app is built, the settings in your plist file are copied to the application plist file.
Notes
- Do not add more than one plist file to the project.
- Any items in your plist file that are duplicates of what is created during the build process are overwritten by the build process.
- Only top-level keys and their entire value are copied. For example, if a key specifies a dict for a value then the entire dict is copied. Top-level keys are keys that are immediate children of PLIST > DICT in the plist XML structure.
Enabling Retina Support
To enable retina support, you need set the NSHighResolutionCapable key to True in the Info.plist in the application bundle, which enables retina support for the UI elements, such as buttons and text. You can do this by creating your own Info.plist file as follows and dragging it into your project:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSHighResolutionCapable</key> <true/> </dict> </plist>
This file will be combined with the plist created by Xojo to ensure your built app is retina-enabled.
Grab Xojo 2014 Release 2 to take advantage of this new feature!