Mac App Store产品构建 [英] Mac app store productbuild
问题描述
Apple的向Mac App Store提交应用程序的文档包含在/Developer/usr/bin/中的使用productbuild命令的示例.
Apple's document on submitting an app to the Mac App store contains this example use of the command productbuild, from in /Developer/usr/bin/.
productbuild \
--component build/Release/Sample.app /Applications \
--sign "3rd Party Mac Developer Installer: Name1 Name2" \
--product product_definition.plist Sample.pkg
在示例应用程序上运行此命令时,出现错误:
When I run this command on my Sample app, I get the error:
productbuild:错误:在以下位置找不到产品定义plist "product_definition.plist".
productbuild: error: No product definition plist found at "product_definition.plist".
这个product_definition.plist是什么,它来自哪里,应该在里面什么,以及应该使用什么工具来创建此plist?
What is this product_definition.plist, where should it come from, what should be inside it, and what tool should be used to create this plist?
推荐答案
From the Apple document you linked: "You should specify a single component, a signature, and (optionally) a product definition file."
除非有特定要求,否则不需要产品定义文件.如果需要,productbuild
的手册页上有很多信息.它只是一个plist字典,像这个例子一样:
Unless you have a specific requirement, you don't need a product definition file. If you need it, the man page of productbuild
has a lot of information. It is just a plist dictionary, like this example:
<?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>gl-renderer</key>
<string>( 'GL_APPLE_float_pixels' IN extensions )</string>
</dict>
</plist>
我已经确认,当您将已归档的应用程序作为软件包共享时,Xcode不会使用产品定义文件.这是实际的命令行:
I've verified that Xcode doesn't use a product definition file when you share an archived application as package. This is the actual command line:
/usr/bin/productbuild --component <path-to-xcarchive>/Cool.app
/Applications
<tmp-path>/package.pkg
--sign 3rd Party Mac Developer Installer
这篇关于Mac App Store产品构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!