plist实用程序在iPhone应用程序中转换info.plist
我尝试使用命令行构建 iPhone 应用程序。
我的 Info.plist 文件有问题。
XCode 将 XML 文件 MyApp-Info.plist 转换为二进制文件 Info.plist,如下所示:
builtin-infoPlistUtility MyApp-Info.plist -genpkginfo <path>/MyApp.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -resourcerulesfile <path>/MyApp.app/ResourceRules.plist -o <path>/MyApp.app/Info.plist
今天,我使用以下命令编译 Info.plist XCode,然后我可以成功地通过协同设计对 MyApp.app 进行签名。
我尝试使用 plutil 工具编译 Info.plist ,如下所示:
plutil -convert binary1 <path>/MyApp.app/Info.plist
它可以工作,但随后代码设计失败并出现错误:
object file format invalid or unsuitable
我认为我需要 plutil 实用程序的其他选项,但我不这样做不知道是哪些。
有什么帮助吗?
I try to build an iPhone app with command line.
I have a problem on Info.plist file.
XCode converts a XML file MyApp-Info.plist to a binary file Info.plist, like this :
builtin-infoPlistUtility MyApp-Info.plist -genpkginfo <path>/MyApp.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -resourcerulesfile <path>/MyApp.app/ResourceRules.plist -o <path>/MyApp.app/Info.plist
Today, I compile Info.plist with XCode and then I can sign MyApp.app with codesign successfully.
I try to compile Info.plist with plutil tool, like this :
plutil -convert binary1 <path>/MyApp.app/Info.plist
It works, but then codesign failed with error :
object file format invalid or unsuitable
I think I need other options for plutil utility but I don't know which ones.
Any help please ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我非常确定
Info.plist
文件不需要采用二进制格式即可工作。如果将其保留为标准 XML 文件是否有效?当
CFBundleResourceSpecification
键丢失时,我看到了此错误消息,其值可能应该是ResourceRules.plist
。如果 CFBundleExecutable 键丢失,也会发生这种情况。查看生成的应用程序包中使用了哪些键的一个好方法是执行以下操作:
Info.plist
文件并检查它如果要转换,请使用
plutil
将生成的二进制 plist 转换为 XML 格式。Im quite sure that the
Info.plist
file does not need to be in binary format to work. Does work if you just leave it as standard XML file?I have seen this error message when the
CFBundleResourceSpecification
key was missing, should probably have the valueResourceRules.plist
. It also seams to happen if theCFBundleExecutable
key is missing.A good way to see which keys that are used in a resulting app bundle is to do this:
Info.plist
file and inspect itUse
plutil
if you want to convert to resulting binary plist to XML format.