创建捆绑包 - 出了什么问题?
我这里有一个相对简单的。 我正在将捆绑包放置在应用程序的 Resources 文件夹中(也可能位于应用程序支持文件夹中)。 这些包将包含应用程序处理的数据的模板信息。 我已经构建了一个捆绑包,扩展名为“booksprintstyle”,并且目录结构符合规范。 我已经准备好了 Info.plist,并且我想我已经填写了我需要的所有值。 我是否需要更改应用程序中的某些内容才能将这些带有扩展名的文件夹识别为捆绑文件,或者我是否在捆绑包结构中丢失了某些内容? 我注意到有些捆绑包有一个名为 PkgInfo 的文件; 这很重要吗?
下面是我的包中的 Info.plist。
<?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">
<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>
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">
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的。 在应用程序的 Info.plist 中导出这些捆绑包类型的 UTI 声明。 您将声明 UTI 符合
com.apple.package
。 有关详细信息,请参阅了解统一类型标识符。那不相关。 必要的声明位于您的应用程序包中,而不是您的文档/插件包中。
不。
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.That isn't relevant. The necessary declaration goes in your application bundle, not your document/plug-in bundles.
No.