如何将Info.plist文件从mac os项目转换为iphone项目?

时间:2023-02-05 14:01:50

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.

我正在为iPhone OS设备开发一个应用程序,并且使用的是第三方引擎,但没有很好的文档记录,但无论如何我都取得了很大的进步。

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.

该引擎的开发人员强烈要求扩展与引擎捆绑在一起的现有模板项目,但引擎的Info.plist文件是Mac OSX项目Info.plist文件。

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.

这是一个iPhone引擎,所以我无法理解为什么Info.plist文件的结构是为了获取Mac OS应用程序的密钥,但事实就是如此。

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.

我做了一个FileMerge比较,以确保文件本身没有任何内容定义它用于一个操作系统或另一个操作系统,所以我猜它是在项目设置中的某个地方定义的。

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!

在Xcode或Property List Editor中打开plist文件,然后尝试添加诸如“Icon已包含光泽和斜角效果”之类的键将无法在此iPhone项目中使用,因为它不在列表中。但是,“可可Java应用程序”和其他可用!

2 个解决方案

#1


0  

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 / 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插件在“文档”类别中没有所有人类可读的名称。

#2


0  

Here's some information I collected from iPhone dev center within the About Information Property List Files chapter:

以下是我在关于信息属性列表文件章节中从iPhone开发中心收集的一些信息:

Important: The property list editor in Xcode displays human-readable strings (instead of the actual key name) for many keys by default. To display the actual key names as they appear in the Info.plist file, Control-click any of the keys in the editor window and enable the Show Raw Keys/Values item in the contextual menu. When typing key names yourself, you should always type the actual key name.

重要说明:Xcode中的属性列表编辑器默认显示许多键的人类可读字符串(而不是实际的键名)。要显示Info.plist文件中显示的实际键名,请按住Control键并单击编辑器窗口中的任意键,然后在上下文菜单中启用“显示原始键/值”项。在自己键入密钥名称时,应始终键入实际的密钥名称。

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.

此外,我的研究使我相信,除非有人创建新项目,否则无法重新创建预先加载的人类可读密钥名称。它存储在项目本身的元信息中,属性列表编辑器可以解释它,更不用说Xcode本身了。因此,在某人决定解释该元信息之前,只需使用上面提到的推荐方法即可。

#1


0  

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 / 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插件在“文档”类别中没有所有人类可读的名称。

#2


0  

Here's some information I collected from iPhone dev center within the About Information Property List Files chapter:

以下是我在关于信息属性列表文件章节中从iPhone开发中心收集的一些信息:

Important: The property list editor in Xcode displays human-readable strings (instead of the actual key name) for many keys by default. To display the actual key names as they appear in the Info.plist file, Control-click any of the keys in the editor window and enable the Show Raw Keys/Values item in the contextual menu. When typing key names yourself, you should always type the actual key name.

重要说明:Xcode中的属性列表编辑器默认显示许多键的人类可读字符串(而不是实际的键名)。要显示Info.plist文件中显示的实际键名,请按住Control键并单击编辑器窗口中的任意键,然后在上下文菜单中启用“显示原始键/值”项。在自己键入密钥名称时,应始终键入实际的密钥名称。

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.

此外,我的研究使我相信,除非有人创建新项目,否则无法重新创建预先加载的人类可读密钥名称。它存储在项目本身的元信息中,属性列表编辑器可以解释它,更不用说Xcode本身了。因此,在某人决定解释该元信息之前,只需使用上面提到的推荐方法即可。