如何将 Info.plist 文件从 mac os 项目转换为 iphone 项目?
我正在为 iPhone OS 设备开发一个应用程序,并使用第三方引擎,该引擎没有很好的文档记录,但无论如何我已经取得了很大的进步。
问题:
引擎的开发人员强烈建议从与引擎捆绑在一起的现有模板项目进行扩展,但引擎的 Info.plist 文件是 Mac OSX 项目的 Info.plist 文件。
这是一个 iPhone 引擎,所以我无法理解为什么 Info.plist 文件的结构是为 Mac OS 应用程序获取密钥,但事实就是如此。
我进行了 FileMerge 比较,以确保文件本身中没有任何内容定义其在一个操作系统或另一个操作系统中的用途,因此我猜它是在项目设置中的某个位置定义的。
编辑 -
在 Xcode 或属性列表编辑器中打开 plist 文件,然后尝试添加诸如“图标已包含光泽和斜角效果”之类的键,在此 iPhone 项目中将不起作用,因为它不在列表。然而,“Cocoa Java应用程序”和其他可用!
I am developing an app for the iPhone OS devices, and am using a third-party engine which is not well documented but I've made great progress with it anyway.
The problem:
The engine's developer strongly urges extending from the existing template projects bundled with the engine, but the engine's Info.plist files are Mac OSX project Info.plist files.
This is an iPhone engine, and so I cannot understand why the Info.plist file is structured to take keys for Mac OS apps, but that's how it is.
I did a FileMerge comparison to ensure there was nothing within the file itself that defined its use for one OS or the other, so I guess it's defined somewhere in the project settings.
Edit -
Opening the plist file in Xcode or Property List Editor and then trying to add a key such as "Icon already includes gloss and bevel effects" will not work in this iPhone project because it is not in the list. However, "Cocoa Java Application" and others are available!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iPhone/iPad 项目的元信息存储在 /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneInfoPlistStructDefs.xcodeplugin 中,假设您采用安装默认值 -- ymmv 。我成功地将 /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Plug-ins/InfoPlistStructDefs.xcodeplugin 中的一些信息合并到其中。由于某种原因,iPhone 插件在“文档”类别中没有所有人类可读的名称。
The meta information for iPhone/iPad projects is stored in /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneInfoPlistStructDefs.xcodeplugin, assuming you took the installation defaults -- ymmv. I successfully merged some information into there from /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Plug-ins/InfoPlistStructDefs.xcodeplugin. For some reason, the iPhone plugin didn't have all the human-readable names in the "Documents" category.
这是我收集的一些信息
“关于信息属性列表文件”章节中的 iPhone 开发中心:
这对于将来的参考、更新信息 Plist 文件的推荐行为很有用...
此外,我的研究使我相信除非有人创建新项目,否则无法重新创建预加载的人类可读键名称。它存储在项目本身的元信息中的某个位置,属性列表编辑器可以解释它,更不用说 Xcode 本身了。因此,在有人决定解释该元信息之前,只需使用上面提到的推荐方法即可。
Here's some information I collected from
iPhone dev center within the About Information Property List Files chapter:
This is useful for future reference, the recommended behaviour for updating the Information Plist files...
Additionally, my research has led me to believe the pre-loaded human-readable key names CANNOT be recreated unless someone creates a new project. It is stored somewhere in the meta information of the project itself and the Property List Editor can interpret that, not to mention Xcode itself. So, until someone decides to interpret that meta info, it's just a matter of using the recommended approach as mentioned above.