views:

219

answers:

1

Hello everyone, I've got a relatively simple one here. I'm making bundles to live inside the Resources folder of my application (and possibly in the Application Support folder). These bundles will contain template information for the data the application handles. I've constructed a bundle, with extension "booksprintstyle", and the directory structure is up to spec. I have an Info.plist all set and I think I've filled in all the values I need to. Do I need to change something in my App to have these folders-with-extensions recognized as bundle files, or am I missing something in my bundle structure? I noticed that some bundles have a file called PkgInfo; is that important?

Below is the Info.plist from my bundle.

<?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"&gt;
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleGetInfoString</key>
    <string>1.0, Copyright © 2009 Joey Lange</string>
    <key>CFBundleIdentifier</key>
    <string>net.atherial.books.exporter.printingpress.printstyle</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>Books Print Style - Generic</string>
    <key>CFBundlePackageType</key>
    <string>BNDL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleDisplayName</key>
    <string>Books Print Style - Generic</string>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © 2009 Joey Lange</string>
    <key>CFBundleVersion</key>
    <string>1.0</string>
</dict>
</plist>
+5  A: 

Do I need to change something in my App to have these folders-with-extensions recognized as bundle files…

Yes. Export a UTI declaration in your app's Info.plist for the type of these bundles. You'll declare the UTI as conforming to com.apple.package. See Understanding Uniform Type Identifiers for more.

Below is the Info.plist from my bundle.

That isn't relevant. The necessary declaration goes in your application bundle, not your document/plug-in bundles.

I noticed that some bundles have a file called PkgInfo; is that important?

No.

Peter Hosey