|
What is a 'plst' (property list) resource?
How do I make a 'plst' resource?You can easily create a Although there is no read 'plst' (0) "MyFile.plist" If the .r and .plist files are not in the same folder make sure that you use a full or relative path. You can also use the The utility "pl" is also available on Mac OS X. You can use "pl" to check the construction of your property list. Usage of this tool in the Terminal application would be, for example: pl yourPropertyListFile What keys should I use?Single-file (non-bundled) applications should define the following keys: CFBundleIdentifier CFBundleName CFBundlePackageType CFBundleSignature CFBundleVersion CFBundleShortVersionString CFBundleLongVersionString CFBundleIconFile NSHumanReadableCopyright NSAppleScriptEnabled The LaunchServices uses the Optional, but highly recommended keys: LSPrefersCarbon LSPrefersClassic LSRequiresCarbon LSRequiresClassic Note: Only one of the above four keys makes sense for a given app. In the absence of any specific declaration in the The If your application supports documents, it can also define an entry per document type that includes the following:
A sample 'plst'Here's a sample <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleIdentifier</key> <string>com.apple.SimpleText</string> <key>CFBundleName</key> <string>Simple Text</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>ttxt</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>LSPrefersCarbon</key> <true/> <key>CFBundleVersion</key> <string>1.4</string> <key>CFBundleShortVersionString</key> <string>1.4</string> <key>CFBundleLongVersionString</key> <string>1.4, Copyright 1985-2001 Apple Computer</string> <key>CFBundleIconFile</key> <string>128</string> <key>NSAppleScriptEnabled</key> <string>Yes</string> <key>NSHumanReadableCopyright</key> <string>Copyright (c) 1985-2001 Apple Computer</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeOSTypes</key> <array> <string>TEXT</string> </array> <key>CFBundleTypeIconFile</key> <string>129</string> <key>CFBundleTypeName</key> <string>Text document</string> <key>CFBundleTypeExtensions</key> <array> <string>txt</string> <string>text</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeOSTypes</key> <array> <string>ttro</string> </array> <key>CFBundleTypeIconFile</key> <string>130</string> <key>CFBundleTypeName</key> <string>Read Only document</string> <key>CFBundleTypeRole</key> <string>Viewer</string> </dict> <dict> <key>CFBundleTypeOSTypes</key> <array> <string>PICT</string> </array> <key>CFBundleTypeIconFile</key> <string>131</string> <key>CFBundleTypeName</key> <string>PICT document</string> <key>CFBundleTypeExtensions</key> <array> <string>pict</string> </array> <key>CFBundleTypeRole</key> <string>Viewer</string> </dict> </array> </dict> </plist> Additional Notes & CommentsCFBundleIconFile and CFBundleTypeIconFileThe CFBundleTypeOSTypes of CFBundleDocumentTypesAs stated in Technical Note TN1085, 'Using the Drag Manager to Interact with and Manipulate File System Entities', the CFBundleInfoDictionaryVersionThe CFBundleInfoDictionaryVersionkey is simply the version of the info dictionary format itself, so that in case Apple ever decides to change this format in the future we will be able to distinguish old from new. The value for this key should be 6.0 CSResourcesFileMappedThe CSResourcesFileMappedkey causes the CFBundle to open the resource fork as a mapped read-only file; attempts to write to this file would fail with a seg fault. There are two memory footprint advantages to adopting this key. The first is that the resource-map is not copied into memory (the in-file map is just used). The second one is that all handles are special handles that just point to the file mapped data (instead of an allocated copy). This key is a boolean, and by default its value is false. The 'carb' resourceAn empty (0-byte length) ReferencesYou can find information related to this topic in the Mac OS X Release Notes for InfoPlists and CFBundles, and in the System Overview book, and in Core Foundation documentation concerning CFBundles. A good place to start for information about XML is the www.XML.com website. Document Revision History
Posted: 2002-02-07 |
|