SoFunction
Updated on 2025-04-12

Detailed explanation of fields in Xcode

Used to provide iOS with some important information about apps, bundles or frameworks. It specifies, for example, how an application should be started, how it is localized, the name of the application, the icon to be displayed, and more. The file is actually an XML file with Apple's predefined schema.

In order to build a device-related health care, you need to add ~iphone or ~ipad to the health care.

Common fields:

1. Obtain version information:

NSDictionary*infoDic = [[NSBundle mainBundle] infoDictionary];

NSString *localVersion = [infoDic objectForKey:@"CFBundleShortVersionString"];

2. The application supports http network requests:

Add NSAppTransportSecurity type in Dictionary .
Add the NSAllowsArbitraryLoads type Boolean under NSAppTransportSecurity, and set the value to YES

Note that the type NSAppTransportSecurity is Dictionary, and NSAllowsArbitraryLoads is Boolean. When copying and pasting, don’t have extra spaces. Copy directly on the segment fault page, and there will often be one more space!

The name of the control application:

Table A-1 Name of the control application

Fields

type

Is it necessary

summary

CFBundleName

String

Yes

The abbreviation of bundle, this technical specifies the name of your application

CFBundleDisplayName String

No

Localized bundle name, localized, you can specify an appropriate value for each language through a file

CFBundleDisplayName

The CFBundleDisplayName field specifies a string value to identify the display name of the bundle. Finder and other user interface components will display it to the user. This name can be different from the bundle name in the file system. Localization of the field can be achieved by adding it to the file in the appropriate .lproj subdirectory. If you need to localize this field, you should also provide a localized version of the CFBundleName field.

CFBundleName

CFBundleName specifies the abbreviation of the bundle. The abbreviation should be less than 16 characters and is suitable for display in menus and "About". This field can be localized by adding it to the file under the appropriate .lproj subfolder. If you localize the field, you should also provide a localized version of the CFBundleDisplayName field.

Application ID + Application Version:

Table A-2 Application ID + Application Version

Fields

type

Is it necessary

summary

CFBundleIdentifier

String

YES

The unique identifier string of the bundle. The format of this string is similar to the naming method of java packages, for example:.

CFBundleShortVersionString

String

YES

This value is a string used to specify the version number you viewed on the APP Store. This value must be incremented in each App Store release version

CFBundleVersion

String

YES

The creation number of the executable file, this sturdy value is a certificate, you can increase it every time you publish it.

CFBundleIdentifier

The CFBundleIdentifier field specifies a unique identification string of the bundle. This identifier adopts a Java package-like naming method, for example. The bundle identifier can locate the bundle at runtime. The preset system uses this string to uniquely identify each application.

It contains a uniquely identified string, which is obtained from the App ID you created in the iOS Provisioning Portal. The App ID contains two parts: Team ID and Bundle ID

CFBundleShortVersionString

The CFBundleShortVersionString field specifies the version number of the bundle. Generally, it contains the primary and secondary version numbers of the bundle. The format of this string is usually "" (n means a certain number). The first number is the main version number of the bundle, and the other two are the minor version numbers. The value of this field is displayed in the About dialog box of the Cocoa application.

This field is different from CFBundleVersion, which specifies a special creation number. The value of CFBundleShortVersionString describes a more formal version number that does not change with each creation.

CFBundleVersion

The CFBundleVersion field specifies a string to identify the creation number. The value of this field usually changes with each creation and is displayed in the extension in the Cocoa "About" dialog box.

In order to specify the version information of a release bundle, you can use the CFBundleShortVersionString field. See "CFBundleShortVersionString".

Obtain user permission information:

Reason strings for accessing user information need to obtain authorized data from users in iOS6

//Calendars,Contacts Location,Photos,Reminders

Table A-3 Obtaining user permission information

Fields

type

Is it necessary

summary

NSCalendarsUsageDescription

String

No

When the application first view accesses the user's calendar, a pop-up box will appear to request permissions from the user. If you set a value for this key, the value will be displayed in the pop-up box

NSContactsUsageDescription

String

No

When the application first attempts to access the user's address book, a pop-up box will appear to apply for permission. Just like the previous key, the value you specify for this key will be displayed in the pop-up box.

NSPhotoLibraryUsageDescription

String

No

Same as above, photo

NSRemindersUsageDescription

String

No

Same as above, memorandum

NSLocationUsageDescription

String

No

Same as above, location information

Application icon:

Table A-4 Application Icons

Fields

type

Is it necessary

summary

CFBundleIconFile

String

No

File name of icon file - was abandoned in version 3.2

UIPrerendered Icon

Boolean

No

This key has been available since the first iOS SDK, which tells iOS whether to add lighting effects to the icons you applied

CFBundleIconFiles

 Array No

This key is introduced to handle the increase in the number of icons required when the iPad and retina screens appear. The value of this skill should be a string array - CFBundleExecutable was abandoned in version 5.0

CFBundleIcons

NSDictionary

No

This is added by iOS 5.0, allowing developers to specify the Newsstand icon and the icon of ordinary applications

CFBundleIconFile

The CFBundleIconFile field specifies the file containing the bundle icon. The file name you give does not need to contain the ".icns" extension. Finder will look for icon files in the "Resource" folder of the bundle.

If your bundle uses a custom icon, you must specify this property. If you do not specify, Finder (and other applications) will use the default icon to display your bundle.

Control application initialization startup:

Table A-5 Control application initialization startup

Fields

type

Is it necessary

summary

UILaunchImageFile

String

No

Startup picture

NSMainNibFile

String

No

The main nib file name of the application, if you use NIB, this is a very important key. It specifies the NIB file used to create initialization windows and related objects when your application starts

UIMainStoryboardFile

String

No

This is a very important key if you use Storyboard. It specifies a storyboard file that can be used to create an initial interface when the application starts

NSMainNibFile

The NSMainNibFile field contains a string containing the main nib file name of the application (not containing the .nib file extension). A nib file serves as an Interface Builder archive, which contains detailed description of the user interface and the association information between objects in those interfaces. When the application is started, the main nib file is automatically loaded. Mac OS X will look for nib files that match the application name.

user interface:

Table A-6 User Interface

Fields

type

Is it necessary

summary

UISupportedInterfaceOrientations

Array

No

The value of this key is an array of screen orientations supported by your application

UIInterfaceOrientation

String

No

If your application value supports a direction, then you should set this key. It ensures that when your application starts, the status bar is in the correct direction, not in one direction when it starts, and then moves to another direction through animation.

UIStatusBarStyle

 

String

No

Set the initial style of the status bar when the application starts

UIStatusBarHidden

 

BOOL

 

No

This key indicates whether the status bar is hidden when the application is started.

UIStatusBarTintParameters

 

NSDictionary

 

No

The status bar can be beautified

UISupportedInterfaceOrientations

The value of this key is an array of screen orientations that your application supports. Available options are:

UIInterfaceOrientationPortrait: Home key in the portrait mode below

UIInterfaceOrientationPortraitUpsideDown: The Home key is in the upper vertical screen mode

UIInterfaceOrientationLandscapeLeft: The Home key is in the left-hand side mode

UIInterfaceOrientationLandscapeRight: The Home button is in the vertical screen mode on the right

UIStatusBarStyle

This key sets the initial style of the status bar when the application is started. Enumeration value of UIStatusBarStyle:

UIStatusBarStyleDefault、UIStatusBarStyleBlackTranslucent、

UIStatusBarStyleBalackOpaque

UIStatusBarTintParameters

In iOS6, the status bar can be beautified, and there are four keys in this dictionary:

Style: represents the barStyle property of the navigation bar

Translucent: represents the translucent property of the navigation bar

TintColor: This specifies the decorative color of the navigation bar.

groundImage: If your navigation bar has a background image, then write the file name of the image here.

Application Control:

Table A-7 Application Control

Fields

type

Is it necessary

summary

UIRequiredDeviceCapabilities

Array/Dictionary

No

It allows you to specify features that the device must have, or features that the device must not have.

UIBackgroundModes

Array

No

When you need your application to run in the background, you need this background mode. The array contains all the background modes required by the application.

MKDirectionsApplicationSupportedModes

Array

No

This new key added to iOS6. It allows you to specify routing information for your application for specific areas and traffic patterns

UIDeviceFamily

Number/Array

No

Xcode automatically adds this key, so you don't need to add it yourself. It indicates which devices the application supports

CFBundleGetInfoHTML

UIAppFonts

Array

No

If you need extra fonts. This key can add non-standard fonts to your application

UIApplicationExitsOnSuspend

Boolean

No

If this key is set to true, the application will be interrupted directly instead of switching to the background.

UIFileSharingEnabled

Boolean

No

If you want users to use iTunes file sharing function to pass files in or out of your application's document directory, then you need to set the value of this key to true

UINewsstandApp

Boolean

No

If your application is of Newsstand type, then you should set this key to true

UIRequiresPersistentWiFi

Boolean

No

iOS By default, if the device is not active for 30 minutes, it turns off the WiFi connection. If you set the value of this key to true, then this behavior will be overwritten. As long as your application is open, the network connection will not be closed.

UISupportedExternalAccessoryProtocols

Array

No

This key specifies the protocol for communication with additional hardware devices

UIBackgroundModes

When you need your application to run in the background, you need this background mode. The array contains all the background modes required by the application. You can use the following values
choose:

audio: Use audio frame to play or record audio

location: You need to access the user's location information in the background

voip: This application supports voice IP, requires Internet connection and audio playback in the background

newsstand-content: Use the Newsstand API to download and process content in the background, which allows the application to be awakened when a new push for release is sent in on behalf of the representative. External-accessory: Use the External Accessory framework to wake up communication with external devices.

bluetooth-central: communicate with external devices using CoreBluetooth framework

Advanced view control:

Table A-8 Advanced View Control

Fields

type

Is it necessary

summary

UIViewEdgeAntialiasing

Boolean

No

By default, your view is drawn by iOS's rendering system, excluding anti-aliasing. This is because it will be much faster if you don't use anti-aliasing

UIViewGroupOpacity

Boolean

No

When you set the transparency of the view, all its subviews are rendered to the same transparency, but will be rendered behind it

Core OS **** The following are automatic modifications of the system, no manual modifications are required:

Table A-9 Core OS

Fields

type

Is it necessary

summary

LSRequiresIPhoneOS

Boolean

No

This key is required when the iOS app runs on the device, and its value must be true when it must be

CFBundlePackageType

String

No

Four letter-long code used to identify the bundle type (in iOS, you can process the application, but in Mac, you can also refer to other types of projects

)

CFBundleInfoDictionaryVersion

String

Yes

The format version information, the structure of the structure is likely to change over time, so you need to tell the operating system what the current version is.

CFBundleExecutable

String

Yes

The executable file name of the bundle, the application in iOS will be packaged into a .app file. This file contains all resources and also has an executable file. This key is a string that specifies the name of the executable file.

CFBundleSignature

String

Yes

The four letter-long code used to identify the creator, this key is related to Mac and has no particular relationship with iOS.

CFBundlePackageType

The CFBundlePackageType field specifies the type of bundle, similar to the file type code of Mac OS 9. The value of this field contains a four-letter code. The code of the application is 'APPL'; the code of the framework is 'FMWK'; the code of the bundle is 'BND'. You can also select other special type codes for loadable bundles if you need it.

CFBundleInfoDictionaryVersion

The CFBundleInfoDictionaryVersion field specifies the current version number of the property list structure. The existence of this field makes it possible to support future versions of the format. When you create a bundle, Project Builder automatically generates this field.

CFBundleExcutable

CFBundleExecutable identifies the name of the executable main file of the bundle. For an application, it is the executable file of the application. For a loadable bundle, it is a binary file that can be loaded dynamically by the bundle. For a framework, it is a shared library. Project Builder will automatically add this field to the file of the appropriate project.

For frameworks, considering the startup efficiency, the executable file name needs to be the same as the framework name. This executable file name should not contain extensions that can be used for multiple platforms.

Note that you must include a valid CFBundleExecutable field in the bundle's file. Mac OS X can use this field to locate executables and shared libraries even when the user renames the directory of an application or bundle.

CFBundleSignature

The CFBundleSignature field specifies the creator of the bundle, similar to the file creator code in Mac OS 9. The value of this field contains four letters long code to determine each bundle.

Localization:

Table A-10 Localization

Fields

type

Is it necessary

summary

CFBundleLocalizations

Array

No

The system determines which languages ​​your application supports by looking for the Iproj directory provided by your application. The value of this key is an array of strings, and each value in the array represents the supported region

CFBundleDevelopmentRegion

String

No

When you develop your application, you usually write it in your local language. The value of this key is a string if the user requested the area without

If necessary resources are used to represent the default localization area

Custom URL and document types:

Table A-11 Custom URL and document type

Fields

type

Is it necessary

summary

CFBundleURLTypes

Array

No

A set of dictionaries that describe the URL protocol supported by the bundle. This key allows you to specify an array of URLs supported by your application

CFBundleDocumentTypes

Array

No

A set of dictionaries that describe the document types supported by the bundle. This key allows you to specify which type of document your application can handle. The values ​​in this array are all dictionary

UIImportedTypeDeclarations

 Array No

In order to allow your application to open types that do not belong to it, you need to import that UTI and the keys you want to use in this case

CFBundleURLTypes

The CFBundleURLTypes field contains a set of dictionaries that describe the URL protocols supported by the application. Its purpose is similar to what CFBundleDocumentTypes does, but it describes the URL protocol rather than the document type. Each dictionary entry corresponds to a separate URL protocol, each representing a URL rule supported by your application. Table A-11-1 lists the fields used in each dictionary entry.

Table A-11-1 Fields of CFBundleURLTypes Dictionary

Fields

type

describe

CFBundleTypeRole String

This field defines the role of those applications related to the URL type (i.e. the relationship of the application to a certain document type). Its value can be Editer, Viewer, Printer, Shell, or None. For a detailed description of these values, see "Configuration of Documents". This field is required. (The role your application plays when opening this URL)

CFBundleURLIconFile String

This field contains the icon filename (excluding extension) string used for this URL type. (Specify the file name of the icon used for this kind of URL)

CFBundleURLName String

This field contains an abstract name string of this URL type. To ensure uniqueness, it is recommended that you use the Java package method naming rules. This name also appears as a field in the file to provide a readable version of the type name. ( This should be a unique string to distinguish different URL types)

CFBundleURLSchemes Array

This field contains a set of URL protocols that can be processed by this type of method. For example: http, ftp, etc. (Array of strings, each element represents the URL supported by this rule)

CFBundleDocumentTypes

The CFBundleDocumentTypes field holds a set of dictionaries that contain the document types supported by the application. Each dictionary is called a type definition dictionary and contains fields used to define the document type. Table A-11-2 lists the supported fields in the type definition dictionary.

Table A-11-2 Fields of the CFBundleDocumentTypes dictionary

Fields

type

describe

CFBundleTypeExtensions Array

This field contains a set of file extensions mapped to this type. To open a document with any extension, a single asterisk "*" can be used. This field is required.

CFBundleTypeIconFile

String

Array of icon files. This field specifies the icon file name used by the system to display this type of document. The extension of the icon file name is optional. If there is no extension, the system will specify one based on the platform (for example, .icons in Mac OS 9).

CFBundleTypeName String

This field contains the abstract name of this document type. It can be localized by including this field in the appropriate file. ( Unique string, distinguishing URL types)

CFBundleTypeOSTypes Array

This field contains a set of four letter-long type codes mapped to this type. To open all types of documents, you can set it to "****". This field is required.

CFBundleTypeRole String

This field defines the roles of those applications related to the document type. Its value can be Editer, Viewer, Printer, Shell, or None. For a detailed description of these values, see "Configuration of Documents". This field is required.

NSDocumentClass String

This field describes the NSDocument subclass used to instantiate the document. For use only for Cocoa applications.

NSExportableAs Array

This field describes a set of document types that can be output. For use only for Cocoa applications.

Using iCloud:

Table A-12 Using iCloud

Fields

type

Is it necessary

summary

NSUbiquitousDisplaySet

String

No

iCloud uses this key to indicate the file storage of your application. Think of it as a directory in iCloud to store files in your application

Bundle core fields:

Mac OS X provides a set of core fields for information describing bundles. The integrated development environment will assign these fields default values. Table A-13 lists these fields.

Table A-13 Standard Field Summary:

Fields

type

Is it necessary

summary

CFBundleDevelopmentRegion

String

No

The area of ​​the bundle. Usually corresponds to the author's native language.

CFBundleGetInfoHTML

String

No

A richer string to display in the Finder's Get Info panel.

CFBundleGetInfoString

String

No

A string used to display in the Get Info panel of Finder.

CFBundleHelpBookFolder

String

No

The name of the folder containing the bundle help file.

CFBundleHelpBookName

String

No

The name of the help file displayed when the bundle's help starts.

CFBundleDevelopmentRegion

The CFBundleDevelopmentRegion field specifies a string value to identify the region of the bundle. Usually corresponds to the author's native language. If the resource for the user's preferred region or language cannot be found, the system will use this value at the end.

CFBundleGetInfoHTML

The CFBundleGetInfoHTML field contains the HTML string that will be displayed in the bundle's information window. If you want stronger expressiveness in the information window, you can use this key-value pair to replace the plain text CFBundleGetInfoString. You can also localize the string by adding it to a file in the appropriate .lproj directory.

If CFBundleGetInfoString and CFBundleGetInfoHTML exist at the same time, the system will choose to use CFBundleGetInfoHTML.

CFBundleGetInfoString

The CFBundleGetInfoString field contains a plain text string that will be displayed in the information window of the bundle (the string here is the long string in Mac OS9). The format of this field should follow the long string in Mac OS 9, for example: "2.2.1, ? Great Software, Inc, 1999". You can also localize the string by adding it to a file in the appropriate .lproj directory.

If CFBundleGetInfoHTML exists, the system will not choose to use this field.

CFBundleHelpBookFolder

The CFBundleHelpBookFolder field contains the folder name of the help file of the bundle. Help is usually localized to a specified language, so the folder pointed to by this field should be a folder in the .lproj directory of the selected language.

CFBundleHelpBookName

CFBundleHelpBookName specifies the help home page for your application. The help page name specified in this field can be different from the HTML file name. The help page name is specified in the CONTENT property of the help file META tag.

Application-specific fields:

Table A-14 Application-specific fields:

Fields

type

Is it necessary

summary

CFAppleHelpAnchor String No The initial HTML help file for the bundle.
NSAppleScriptEnabled String No Specifies whether AppleScript is supported.
NSHumanReadableCopyright String Yes Copyright information displayed in the dialog box.
NSJavaNeeded Boolean or String No Specifies whether the program requires a Java virtual machine.
NSJavaPath Array No The path to which a set of Java classes is located (NSJavaRoot needs to be added before).
NSJavaRoot String No Contains the root directory of the Java class.
NSMainNibFile** String Yes

The main nib file name of the application.

NSPrincipalClass String Yes The name of the main class of the bundle.
NSServices Array No A set of dictionaries that describe services provided by the application.

CFAppleHelpAnchor

The CFAppleHelpAnchor field defines the initial HTML help file name of the bundle and does not need to include the .html or .htm extension. This file is located in the localized resource directory of the bundle, or if there is no localized resource directory, it is placed directly in the Resources directory.

NSAppleScriptEnabled

The NSAppleScriptEnabled field indicates whether the application supports AppleScript. If your application supports it, you need to set the value of the string to "Yes".

NSHumanReadableCopyright

The NSHumanReadableCopyright field contains a string containing the copyright information of the bundle. You can display it in the About dialog box. This field will usually appear in a file because the value of the field is often required to localize.

NSJavaNeeded

The NSJavaNeeded field contains a Boolean value to determine whether the Java virtual machine needs to be loaded and run before executing the code of the bundle. You can also specify a string type value "YES" instead of a Boolean type value.

NSJavaPath

The NSJavaPath field contains a set of paths. Each path points to a Java class. This path may be an absolute or a relative path relative to the location defined by the NSJavaRoot field. The development environment will automatically save these values ​​in an array.

NSJavaRoot

The NSJavaRoot field contains a string pointing to a directory. This directory is the root directory of the application's Java class file

NSPrincipalClass

The NSPrincipalClass field defines the name of the main class of a bundle. For applications, this name is by default the name of the application.

NSServices

NSServices contains a set of dictionaries that details the services provided by the application. Table A-5 lists the fields used to specify the service.

Table A-14-1 Fields of the NSServices dictionary:

Fields

type

describe

NSPortName String This field specifies the port name provided by your application listener to accept external service requests.
NSMessage String This field specifies the instance method name to call the service. In Objective-C, the instance method is in the form of messageName:userData:error:. In Java, the instance method is in the form of messageName().
NSSendTypes Array This field specifies a set of data type names that can be read by the service. The NSPasteboard class lists several commonly used data types. You must include this field, NSReturnTypes, or both.
NSReturnTypes Array This field specifies a set of data type names that can be returned by the service. The NSPasteboard class lists several commonly used data types. You must include this field, NSSendTypes, or both.
NSMenuItem Dictionary This field contains a dictionary that specifies text added to the Services menu. The only field in the dictionary is called default and its value is the text of the menu item. This value must be unique. You can use the slash "/" to specify a submenu. For example, when Mail/Send appears in the Services menu, it is a menu with a Send submenu and named Mail.
NSKeyEquivalent Dictionary This field is optional and contains a dictionary containing shortcut keys to request service menu commands. Similar to NSMenuItem, the only field in the dictionary is called default and its value is a single character. The user can request the shortcut key by pressing the Command, Shift function keys and the corresponding characters.
NSUserData String This field is an optional string that contains your selected value.
NSTimeout String This field is an optional numeric string that specifies the number of milliseconds to wait from the application requesting the service to receiving its response.

Start Service Field:

The Start Service field specifies how applications in Mac OS X are started. These fields are suitable for CFM and Mach-O executables. For details on CFM and Mach-O executables, see "CFM executables" in the "Installation and Integration". Table A-6 lists the fields for starting the service.

Table A-15 Start Service Field:

Fields

type

Is it necessary

summary

LSBackgroundOnly String No Specifies whether the application is only running in the background. (Apps for Mach-O only).
LSPrefersCarbon String No Specifies whether the application is preferred to run in the Carbon environment.
LSPrefersClassic String No Specifies whether the application is preferred to run in Classic environment.
LSRequiresCarbon String No Specifies whether the application must run in a Carbon environment.
LSRequiresClassic String No Specifies whether the application must run in a Classic environment.
LSUIElement String No Specifies whether the application is a user interface component, i.e. an application should not appear in the Dock or force exit the window.

LSBackgroundOnly

If the field exists and is set to "1", the startup service will only run in the background. You can use this field to create a backend application without a user interface. If your application uses an advanced framework connected to the window server but does not need to be displayed, you should also use this field. The background application must be compiled into a Mach-O executable file. This option does not apply to CFM applications.

You can also specify that the field has a type Boolean or Number. However, these types of values ​​are supported only on Mac OS X 10.2 or above.

LSPrefersCarbon

If this field is set to "1", Finder will display the "Open in Classic Environment" control option in the display profile panel. By default, the control is not selected. If required, users can modify this control option to launch the application in the Classic environment.

You can also specify that the field has a type Boolean or Number. However, these types of values ​​are supported only on Mac OS X 10.2 or above. If you have added this field to your property list, don't include the LSPrefersClassic, LSRequiresCarbon, or LSRequiresClassic fields at the same time.

LSPrefersClassic

If this field is set to "1", Finder will display the "Open in Classic Environment" control option in the display profile panel, and by default the control is selected. If required, users can modify this control option to launch the application in the Carbon environment.

You can also specify that the field has a type Boolean or Number. However, these types of values ​​are supported only on Mac OS X 10.2 or above. If you have added this field to your property list, don't include the LSPrefersCarbon, LSRequiresCarbon, or LSRequiresClassic fields at the same time.

LSRequiresCarbon

If this field is set to "1", the startup service will run the application only in the Carbon environment. This field can be used if your application should not run in a Classic environment.

You can also specify that the field has a type Boolean or Number. However, these types of values ​​are supported only on Mac OS X 10.2 or above. If you have added this field to your property list, don't include the LSPrefersCarbon, LSPrefersClassic, or LSRequiresClassic fields at the same time.

LSRequiresClassic

If this field is set to "1", the startup service will run the application only in the Classic environment. This field can be used if your application should not run in a Carbon-compatible environment.

You can also specify that the field has a type Boolean or Number. However, these types of values ​​are supported only on Mac OS X 10.2 or above. If you have added this field to your property list, don't include the LSPrefersCarbon, LSPrefersClassic, or LSRequiresCarbon fields at the same time.

LSUIElement

If the field is set to "1", the startup service will run the application as a user interface component. User interface components do not appear in the Dock or Forced Exit window. Although they usually run as background applications, they can also display a user interface in the foreground if desired. Click on the window that belongs to the user interface component and the application will handle the generated events.

Dock and login window are two user interface component applications.

Application Package Field:

The purpose of application packaging is to package an application into a self-contained entity and hide its content from the user. However, users often want to operate certain files of the application. For example, users may want to add or delete a plugin, localize resources, etc. Developers can specify some projects in the file that can be maintained by users. Then Finder will display these items in the bundle's information panel and allow users to browse, delete or add these items.

CFBundleInstallerInfo

The root field of the application package information is CFBundleInstallerInfo. This field defines a dictionary that contains the fields listed in Table A-7. The "Must" column indicates which features you must support.

Table A-16-1 Application Packaging Fields:

Fields

type

Is it necessary

summary

APInstallerURL String Yes A URL path to the file you wish to install.
APFiles Array Yes A set of dictionaries that describe files or directories that can be installed.

APInstallerURL

The APIInstallerURL field specifies a path to the file you wish to install. You mustfile://localhost/path/This is a form to illustrate this path. All installed files must be located in this folder.

APFiles

The APFiles field specifies a dictionary that describes the file you wish to install. Each dictionary entry can contain a description of a file or directory. You can have the APFiles field contained in itself and specify files inside the directory. Table A-8 lists the information used to specify a single file or directory.

Table A-16-2 APFiles Dictionary Fields:

Fields

type

describe

APFileDescriptionKey String A short description used to display in the Finder information window.
APDisplayedAsContainer String If the value is "Yes", the item appears as a directory icon in the information panel; otherwise, it is displayed as a document icon.
APFileDestinationPath String A relative path to install components.
APFileName String The name of the file or directory.
APFileSourcePath String The path to the component in the application package, relative to the APIInstallerURL path.
APInstallAction String Actions to manipulate components: "Copy" or "Open"

UIFileSharingEnabled The application supports itunes shared folders. The value is boolean value. YES share; NO not share.

The name of this field in the field editor is: Application support iTunes file sharing