Working With Property Lists
- PDF for offline use
- Related Recipes:
- Related SDKs:
- Related Videos:
Let us know how you feel about this
This document introduces Xamarin Studio's graphical and advanced property list (.plist) editor for working with Info.plist and Entitlements.plist. It illustrates setting icons and launch images for iOS application, and demonstrates specifing app capabilities (entitlements) from inside Xamarin Studio.
Xamarin Studio features a graphical .plist editor that makes editing app properties and capabilities easier. Xamarin Studio has two .plists -
Info.plist for editing app properties and icons, and
Entitlements.plist for managing app capabilities. This guide introduces the two .plists and provides an overview of working with them in Xamarin Studio.
The Information Property List (
Info.plist) is a required iOS file that provides information about your application's configuration to the system. Xamarin Studio's custom
Info.plist editor features three panels controlled by tabs at the bottom left of the editor window:
Each panel controls different properties, as outlined below:
- Application Panel - A graphical interface to set common application properties as well as icons and launch images; specify maps integration and backgrounding modes.
- Advanced Panel - The advanced panel is the place to specify supported document types, UTIs, and URL types.
- Source Panel - The source panel controls less common properties as well as custom properties for the application.
The next three sections investigate the features of each panel in more detail.
Xamarin Studio features a graphical interface for editing common
Info.plist entries for an application:
- Application properties
- Supported device types
- Support orientations for each device type
- Status bar style and color
- Icons and start-up screens
- Maps and Background Modes
These are described in more detail in the next sections.
iOS Application Target
This section contains important information that describes your application. The Identifier stored here must match the Bundle Identifier that is entered in iTunes Connect (for App Store apps) and also in the iOS Provisioning Portal App IDs list and Development and Distribution certificates.
The device Deployment info sections are displayed selectively, depending on the selectin in the Devices dropdown in the Application Target section above. The Main Interface drop-down is set to MainStoryboard in Storyboard-driven applications. If the user interface is entirely written in code then this can be left blank.
Supported Device Orientations
Supported Device Orientations controls how the app responds to device rotation. It is very common for iPhone/iPad apps to support only Portrait, or everything but Upside Down. Generally all iPad applications except games should support all orientations.
Status Bar Styles
The Status Bar Styles section is a graphical interface for editing an application's
Icons, Launch Images, and iTunes Artwork
Information on using icons, images, and artwork in your Info.plist file can be found in the Working with Images guide.
Maps Integration and Background Modes
Info.plist contains special sections to specify maps integration and backgrounding modes. Choosing the options you want to support will add the required properties to your application for you.
For more information on working with maps, refer to the Xamarin iOS Maps guide.
For more information on Background Modes, refer to the Xamarin Backgrounding in iOS guide.
The advanced panel controls the document types and URL schemes that the application supports.
For applications that support opening specific types of files, iOS provides the
CFBundleDocumentTypes key. If we want our application to support certain known file types - for example PDFs - we would add the PDF value to the key. This section provides a convenient way to enter the data that will be stored
CFBundleDocumentTypes key in the
Refer to the documentation on Registering the File Types Your App Supports for details on how to configure these values.
Sometimes an application needs to support opening a custom file type. For example, we may want to open image files with a custom extension .xam. To specify a custom file type, we'll create a custom UTI - Universal Type Identifier - using the
UIExportedTypeDeclarations key. The screenshot below illustrates how to create a custom UTI for the .xam extension:
Just as exported type UTIs specify custom UTIs specific to your app, the imported type UTIs (
UIImportedTypeDeclarations key) specify custom types supported but not owned by your application.
For more information on using custom UTIs, refer to Apple's Registering File Types Your App Supports guide.
A URL scheme name (also called protocol) is the first part of the URL. For example,
https:// are common URL schemes. You have the option of creating a custom URL scheme for your application. Custom URL schemes are used to communicate and send data back and forth with other applications. The following screenshot illustrates creating a new custom URL scheme called
For more information on implementing custom URL schemes, refer to Apple's Implementing Custom URL Schemes section of this guide
The Source tab of the
allows custom values to be added or edited. Xamarin Studio provides a list of the
most common properties:
For known properties Xamarin Studio will a list of valid values, as illustrated by the following screenshot:
Xamarin Studio also detects the Property Type, as shown:
Review Apple’s App Related Resources links for additional information on optional properties.
This article demonstrated using the graphical and advanced .plist editors to edit common app configurations as well as to specify icons and launch images. It also introduced the
Entitlements.plist for adding and managing app capabilities.