0% found this document useful (0 votes)
14 views14 pages

iOS-Working With Property Lists

The document provides an overview of working with Property Lists (.plist) in Xamarin Studio, detailing the Info.plist for app properties and icons, and the Entitlements.plist for managing app capabilities. It describes the features of the Info.plist editor, including panels for application settings, advanced configurations, and source editing. Additionally, it explains how to add and manage entitlements through the Entitlements.plist file, emphasizing the need for a provisioning profile linked to an Apple developer account.

Uploaded by

Dung Le
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views14 pages

iOS-Working With Property Lists

The document provides an overview of working with Property Lists (.plist) in Xamarin Studio, detailing the Info.plist for app properties and icons, and the Entitlements.plist for managing app capabilities. It describes the features of the Info.plist editor, including panels for application settings, advanced configurations, and source editing. Additionally, it explains how to add and manage entitlements through the Entitlements.plist file, emphasizing the need for a provisioning profile linked to an Apple developer account.

Uploaded by

Dung Le
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Working With Property Lists

Overview
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.

Info.plist
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.

Application Panel

Xamarin Studio features a graphical interface for editing common Info.plist entries for an application:

1. Application properties
2. Supported device types
3. Support orientations for each device type
4. Status bar style and color
5. Icons and start-up screens
6. 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.

Device Deployment

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 UIStatusBarStyle:

Icons

The available icon selections are affected by the Devices selection, so iPhone- or iPad-only apps will only
see the relevant icon settings.
The relevant icons and their dimensions are listed below, and discussed in more detail in the Working with
Images document.

App Icons

1. iPhone iOS 5, 6 – 57 x 57
2. iPhone iOS 5, 6 Retina – 114 x 114
3. iPhone iOS 7 Retina - 120 x 120
4. iPad – 72 x 72

5. iPadRetina – 144 x 144

Spotlight & Settings Icons

1. iPhone Spotlight & iPad Settings iOS 5, 6 – 29 x 29


2. iPhone Spotlight & iPad Settings iOS 5, 6 Retina – 58 x 58
3. iPhone Spotlight & iPad Settings iOS 7 Retina – 80 x 80
4. iPad Spotlight – 50 x 50

5. iPad Spotlight Retina – 100 x 100

Launch Images

A launch image is the first thing the user sees when opening the application. Phone and iPod touch
devices only support portrait launch images, listed below:
1. iPhone – 320 x 480 – Default.png
2. iPhone Retina – 640 x 960 – [email protected]
3. iPhone 4” Retina – 640 x 1136 – [email protected]

iPad devices support a variety of default images, and at a minimum you should supply a Portrait image in
regular and Retina resolution. Xamarin Studio allows you to configure both Portrait and Landscape images,
listed below:

1. iPad Portrait – 768 x 1024 – Default.png


2. iPad Landscape – 1024 x 768 – [email protected]
3. iPad Portrait Retina – 1536 x 2048 – [email protected]
4. iPad Landscape Retina – 2048 x 1536 – [email protected]

You can use the Resources folder to manage these files. Ensure you follow the correct naming convention
and place the images in the Resources folder with a Build Action of BundledResource. Refer to the
Xamarin Working with Resources guide for more information on the Resource directory.

iOS allows different images to be configured for LandscapeLeft and LandscapeRight using the file
naming convention. Refer to the Xamarin Working with Images guide for more information.

Asset Catalogs

Xamarin Studio gives you the option of migrating icons and launch images to Asset Catalogs. Asset
Catalogs are a convenient way of organizing image sets. To use Asset Catalogs, set all the images for your
icons or launch screens beforehand, and then press Migrate to Asset Catalog. Xamarin Studio will create a
new folder for your assets in the Resources directory, as illustrated by the screenshot below:
You'll be able to select the Asset Catalog from the dropdown inside the Info.plist interface, as
illustrated by the following screenshot:

For more information on Asset Catalogs, refer to Apple's About Asset Catalogs recipe.

iTunes Artwork

iTunes artwork accompanies an application into the iTunes app store. iTunes artwork requires two
resolutions:

1. iTunes Artwork – 512 x 512


2. iTunes Artwork Retina – 1024 x 1024

Maps Integration and Background Modes

The 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.

Advanced Panel

The advanced panel controls the document types and URL schemes that the application supports.
Document Types

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 in the
CFBundleDocumentTypes key in the Info.plist file.

Refer to the documentation on Registering the File Types Your App Supports for details on how to
configure these values.

UTIs

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.

Custom URLs

A URL scheme name (also called protocol) is the first part of the URL. For example, http:// and
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 monkeys://:

For more information on implementing custom URL schemes, refer to Apple's Implementing Custom URL
Schemes section of this guide

.## Source Panel

The Source tab of the Info.plist file 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.

Entitlements.plist
Entitlements (also called store technologies) are special app capabilities and security permissions granted
to applications correctly configured to use them. These include use of services like iCloud as well as push
notification, PassKit, and more. Entitlements must be linked to an Apple developer account and require a
provisioning profile to be installed on the device and in the application. The Entitlements.plist file
makes specifying entitlements in the application easier.

Adding Entitlements.plist

Older applications may not have an Entitlements.plist in the solution, but one can be added by right-
clicking on the project and choosing Add > New File > iOS > Entitelements.plist, as illustrated by the
screenshot below:

Working with Entitlements.plist

Entitlements can be added by double-clicking to edit the Entitlements.plist file. This will open the
graphical editor, as illustrated by the screenshot below:
The Entitlements.plist currently supports iCloud, Passbook, and Keychain. For more information on
working with entitlements, refer to the Xamarin Device Provisioning guide.

Note: The Entitlements.plist file helps fill in the correct properties for an application using
capabilities, but it can't generate a provisioning profile as it is not linked to an Apple developer account.
You will still need to generate a provisioning profile using the developer portal to deploy and distribute the
application.

Source Panel

Like the Info.plist editor, the Entitlements.plist editor has a source panel. The source panel
allows you to edit the entitlements properties and values directly, as illustrated by the following screenshot:
Summary
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.

You might also like