Prepare for Mac App Store Submission
提交到Mac 应用商店之前的准备
Most of your time is spent on coding tasks, but to develop for the Mac App Store, you need to perform a number of administrative tasks, using Xcode and other tools. You’ll do this throughout the lifetime of your app. The Mac App Store is a curated store and restricts which apps may be sold. Apple does this to provide the best experience possible for users. For example, apps that are sold on the Mac App Store must not crash or exhibit other major bugs.
你的大多数时间是用来编码,但是要想为Mac应用商店做开发,你需要用Xcode 和其它工具来执行一些管理工作。你将在整个应用程序生命周期中都做这些。Mac 应用商店是一个有组织的(curated)商店,它严格限制哪些应用程序能被出售。 苹果公司以此来给用户提供尽可能最好的用户体验。比如,在Mac应用商店准备出售的应用程序决不能崩溃或者出现其它主要bugs。
Apple provides the tools you need to develop, test, and submit your app to the Mac App Store. All apps submitted to the store need to be code signed. If you use certain technologies—such as iCloud storage or In-App Purchase—there are additional configuration and administrative tasks you need to perform. There are tasks you perform to manage a team of developers as well. You also need to provide information about your app that the Mac App Store displays to customers, and you need to upload screenshots. Then you submit the app to Apple for approval. After the app is approved, you set the date when the app should appear for sale in the Mac App Store. Finally, you use Apple’s tools to monitor the sales of the app, customer reviews, and crash reports. You repeat the entire process again to submit updates to your app.
苹果公司提供了开发需要的各种工具,测试以及把应用程序提交到Mac 拥有商店。 所有被提交到应用商店的应用程序都必须是已经签名的。 如果你想使用特定的技术---比如iCloud存储 或 内置购买(In-App Purchase)---你还需要执行额外的配置和管理任务。 苹果也提供让你执行后能管理一个开发者团队的很多任务。你还需要需要提供应用程序的各种信息,以让Mac应用商店展示给顾客,你还需要上传应用截图。然后你把应用程序提交到苹果做审核(approval)。 当应用程序被审核通过后,你设置应用程序在应用商店出售的确切日期。最后,你使用苹果提供的工具来监控(monitor)应用程序的销售情况,用户反馈(reviews),以及崩溃报告。更新应用时再重复这一整个过程。
Enroll in the Mac Developer Program
一、注册加入Mac开发者计划(Program)
To develop for the Mac App Store, you first need to join the Mac Developer Program. After you enroll in the program, you have access to all the resources and tools that you need to manage your account and begin using certain technologies.
要想开发Mac应用商店应用,你首先需要加入Mac 开发者计划。 然后,你就可以访问用来管理账号并开始使用特定技术的所有资源和工具。
You become the primary contact for Apple, sign legal agreements, create your assets, and market your app. You’ll be asked if you are an individual developer or a company. If you are a company, you may add others to your team and grant some of them privileges to manage your account as well. If you use certain technologies—such as iCloud storage—individuals who need to run the app during development need to be added to your team to do so.
要想称为苹果的主要联系人,你需要签署法律协议,创建你的档案,并把应用程序发布到应用市场。你将被询问你是个人开发者还是一个公司。 如果你是一个公司,你可能添加其他成员到你的团队并给于(grant)其中的一些队员权限(privileges)使他们也能管理你的账号。如果你需要使用一些特定的技术---比如iCloud存储---团队个人需要把开发过程中的应用程序添加到团队中时需要使用。
You administer your account with these Mac Developer Program web tools:
你可以使用以下Mac开发者计划网页工具来管理你的账号:
-
Member Center. The tool to manage developer program accounts. Member Center is also a gateway to other resources and tools, including iTunes Connect.
- 会员中心。 用来管理开发者计划账号的工具。 它还是通往其它资源和工具的入口,包括iTunes 连接。
-
iTunes Connect. The marketing and business tool used to check the status of your contracts, set up tax and banking information, obtain sales and finance reports, and manage metadata about the app.
- iTunes连接。 用来检查你的合约(contract)状态的市场和业务工具,它可以建立税务信息和银行信息,获取销售数据和财务报告,以及管理应用程序的元数据。
You can perform some of the Member Center administrative tasks using Xcode and return as needed by going to Member Center at http://developer.apple.com/membercenter
. These administrative tasks are necessary for security to ensure that your app is not distributed prematurely.
你可以使用Xcode来执行一些会员中心管理任务, 并根据需要通过登录会员中心 http://developer.apple.com/membercenter 返回。这些管理任务对于安全性来说是不要的,它能确保你的应用程序没有被过早(prematurely)的发布(distributed)。
Create Your Project and Configure It for the Mac App Store
二、创建并配置你的项目
When you create an Xcode project from a template, some of the Mac App Store configuration is completed for you. Xcode prompts you to enter the product name and company identifier. The bundle ID, which is used throughout the system to identify your app, is derived from these two properties. For example, in the TrackMix project, the product name is TrackMix and the default company identifier is com.MyCompany
. Therefore, the default bundle ID iscom.myCompany.TrackMix
. You just need to replace the company name in the Bundle Identifier field with your name.
当你从模板创建一个Xcode项目时,一些Mac应用商店的配置已经为你完成。 Xcode提示你键入产品名称(product name)以及公司标识符(company identifier). bundle ID 用来在整个系统中识别你的应用程序,它从这两个特性派生(derived from)而来。比如,TrackMix项目,product name 是 TrackMix, 默认的company identifier 是 com.MyCompany。 因此,默认的bundle ID 是 com.myCompany.TrackMix。 你只需要用你自己名称代替Bundle Identifier中的company name。
Xcode uses reasonable defaults for other values as well. Carefully consider the template you use to create an app and the settings used to configure the project; starting with the right template helps speed the development process. If you want to change these settings later, or use iCloud storage, you’ll find most of these settings on the target’s Summary pane in Xcode.
Xcode 还为其它值使用了很多合理的默认值。 仔细考虑使用哪种模板来创建一个应用程序并仔细考虑如何设置你的项目;使用正确的模板开始将帮助你加快开发进程。 如果你想在稍候修改这些设置,或者使用iCloud存储,你可以在Xcode中target的Summary面板中找到大多数这些设置。
All apps submitted to the Mac App Store need to have an app icon (it appears in the Mac OS X Application Target section) and need to enable app sandboxing (in the Entitlements section). Entitlements give your app permission to perform certain functions. A sandbox is a set of fine-grained controls that limit an app’s access to files, preferences, network resources, hardware, and so on.
所有上传到Mac 应用商店的应用程序都需要有一个应用图标(它在Mac OS X应用程序Target 部分出现),并需要开启应用程序沙盒(在Entitlements部分)。 Entitlements(授权)给你的应用程序权限来执行特定的功能。 沙盒是详细的(fine-grained)控件,它们包括限制应用程序对访问文件,偏好设置,网络资源,硬件等等。
Provision Your Mac for iCloud and Other Technologies
三、让你的Mac为iCloud 和其它技术做准备
If you use certain technologies, you need to perform additional administrative tasks and configure your app accordingly. Here are some technologies that require provisioning your Mac for development:
如果你使用特定的技术,你需要执行额外的管理任务并相应地配置应用程序。 以下是一些开发时你的Mac需要提供的技术:
-
Game Center. A social gaming service allows players to share information about the games they are playing and to join other players in multiplayer matches.
- Game Center. 一个社交(social)的游戏服务,它允许玩家分享他们正在玩的各种游戏信息,并参与到多玩家竞赛中去。
-
iCloud. An iCloud storage and cloud computing service allows you to share the user’s data among multiple instances of your app running on different iOS and OS X devices.
- iCloud。iCloud 存储 和 云计算服务,它允许运行在不同iOS 和 OS X 设备上的应用程序的多个实例之间分享用户数据。
-
In-App Purchase. Embedding a store directly into your app allows you to connect to the Mac App Store and securely process payments from the user.
- 内置购买。直接嵌入一个商店到应用程序,它允许你连接到Mac 应用商店并安全地从用户那接受支付。
-
Push notifications. This service allows an app not running in the foreground to notify the user that it has information for the user.
- 发送通知。 该服务允许没有运行在前台的应用程序给用户发送一些信息。
Fortunately, Xcode creates some team assets—the Mac Team Provisioning Profile and the Xcode Wildcard App ID—to simplify the provisioning process. For example, using the Mac Team Provisioning Profile, your team can begin using iCloud storage immediately. Some technologies need to be enabled using Certificates, Identifiers & Profiles within Member Center in order for you to use them. If you use iCloud storage, you also need to configure iCloud under Entitlements in the target’s Summary pane in Xcode. If you don’t use any of these technologies, you can can skip this step.
幸运地是,Xcode 创建了一些团队优惠配置(assets)---Mac 团队配置文件(Team Provisioning Profile) 和 Xcode Wildcard App ID --- 来简化配置过程。比如,使用Mac团队配置文件,你的团队就能立即开始使用iCloud存储。一些技术需要开启会员中心(Member Center)的证书(Certificates), Identifiers & Profiles 以确保你能使用它们。 如果你使用iCloud 存储,你还需要在Xcode中target里的Summary 面板中Entitlements(授权)下配置iCloud。如果你不使用这些技术中的任何一个,你可以跳过该步骤。
Read App Distribution Guide to learn more about provisioning systems for development.
阅读App Distribution Guide 学习更多关于开发中的配置系统(provisioning systems)。
Configure App Data in iTunes Connect
四、在iTunes Connect 中配置应用数据
When an app is sold on the Mac App Store, the store displays a lot of information about the app, including its name, a description, an icon, screenshots, and contact information for your company. To provide that information, you log in to iTunes Connect, create a record for the app, and fill in some forms. The record in iTunes Connect includes a field for a bundle ID; the value you place in this field must exactly match the bundle ID for the app. The app name and version need to match the Xcode project configuration as well. The artwork that the Mac App Store needs to present your app to customers needs to be uploaded to pass validation tests.
当应用程序在Mac 应用商店被售出,商店显示很多关于应用程序的信息,包括应用名称,详细介绍,图标,截图以及你公司的联系方式。 为了提供这些信息,你需要登录iTunes Connect,创建一个应用程序记录,并填一些表格。iTunes Connect 中的记录包括一个bundle ID 项;该值必须跟跟应用程序中的bundle ID相一致。 应用程序名称和版本号需要跟Xcode项目配置中的相一致。艺术品--- Mac 应用商店要呈现给用户的应用程序,需要通过审核验证测试。
Normally, you create your iTunes Connect app record late in the development process because there’s a time limit from when you create the record to when you must submit your app. Some Apple technologies, including Game Center and In-App Purchase, require that an iTunes Connect record to be created earlier. For example, with In-App Purchase, you need to create the app record so that you can add the details of the items you want to sell. This content needs to be created before the development process is complete so that you can use it to test the code you added to implement In-App Purchase.
正常情况下,你可以在开发过程中建立你的iTunes 连接,因为从创建一个记录到你必须递交你的应用程序之间有一个时间限制。一些苹果技术,包括游戏中心(Game Center) 和 内置购买,要求要尽早地建立一个iTunes 连接记录。比如,内置购买,你需要创建应用程序记录,这样你就可以添加你想要出售的项目详情。 该内容需要在开发过程完成之前被创建,这样你就可以用它来测试你的内置购买代码。
Code Sign Your App
五、应用程序代码签名
Your app needs to be signed before it is submitted to the Mac App Store. By signing your app, you certify that the app is released by you. Because the app is signed with a private key that only you possess, Mac OS X can distinguish between legitimate and modified copies of your app.
你的应用程序在递交到Mac 应用商店之前需要被签名。 通过给应用程序签名,你就可以证明该应用程序是由你发布的。 因为应用程序由一个只有你能处理的私钥(private key)签名的,Mac OS X 可以识别出应用程序是合法还是被修改后的山寨版。
There are many different types of signing certificates, used for specific purposes, that Xcode creates for you. You sign the entire Xcode project using a Mac Submission certificate, and you sign the installer package using a Mac Installer certificate. (You’ll create an installer package as part of the submission process.) If you use certain technologies—for example, iCloud storage and push notifications—you need a Mac Development certificate and provisioning profile too. If you want to distribute your app outside of the Mac App Store, you sign it using a Developer ID certificate. Mac Development certificates are owned by individuals and the others are shared by the team.
Xcode 可以为你创建很多种不同类型的签名证书(signing certificates),它们都被用于特定的目的。 你用一个Mac 提交证书(submission certificate)来签名整个Xcode 项目, 你使用一个Mac 安装证书(Installer certificate)。 (提交过程中会创建一个安装包。) 如果你使用特定的技术---比如,iCloud 存储和推送消息---你还需要一个Mac 开发证书和配置文件。如果你想要在Mac 应用商店外发布应用程序,你可以使用一个开发ID证书进行签名。 Mac开发证书是个人开发者个有的,其它证书则是和团队共用的。
The first time you refresh your provisioning profiles in Xcode, it offers to request different types of signing certificates for you. To start this process, open the Organizer window, select Devices, select Provisioning Profiles in the Library section, and click Refresh. Log in with your Mac Developer Program username and password. If you are an individual developer, Xcode creates development and distribution certificates. If you don’t have permission to submit your app to the Mac App Store, Xcode only creates a Mac Development certificate for your.
当你第一次刷新Xcode里的配置文件时,它会向你请求各种不同类型的签名证书。 要想开始该过程,打开Organizer window, 选择 Devices, 在Library部分选择Provisioning Profiles, 并点击Refresh. 登录Mac 开发者计划。如果你是个人开发者,Xcode 创建开发和发布证书。 如果你不能递交应用程序到Mac 应用商店,Xcode 只创建一个Mac 开发证书。
When a dialog appears at the end of the refresh process asking whether you want to save your developer profile, click Export. Since the private keys for these certificates are stored on your system, you need to save them as a backup or export them in order to move them to another Mac. Export your certificates even if you don’t use all of them.
当刷新过程最后出现一个对话框,问你是否想要保存你的开发者配置文件(developer profile),点击Export。当这些证书的私钥被存储在系统之后,你需要把它们备份它们或把它们导出到另一个Mac。导出所有的证书即使你没有全部用到。
You sign your app by setting the Code Signing Identity build setting for your project to one of these certificates. When you enable entitlements in the target’s Summary pane in Xcode, this build setting defaults to your Mac Development certificate. Before submitting to the Mac App Store, set this build setting to your Mac Submission certificate. You select the Mac Installer certificate later, when you actually submit an archive of your app in the Archives organizer.
你可以通过设置代码签名认证(Code Signing Identity)来设置这些证书。(如下图) 当你开启了target的Summary面板中的entitlements后,该项设置默认为Mac 开发证书。 在你递交应用程序到应用商店之前,设置该项设置为Mac 提交证书(Submission certificate)。然后当你在Archives organizer 里递交应用程序的压缩包时,选择Mac安装证书(Installer certificate)。
Submit to the Mac App Store
六、递交到Mac 应用商店
Submitting your app to the Mac App Store is a multistep process involving several tools.
往Mac 应用商店递交应用是一个多步骤过程,它涉及了以下工具。
-
First, log in to iTunes Connect and change the state of your app record to “Waiting for Upload” or later.
首先,登录iTunes Connect 并把你的应用程序状态转为"Waiting for Upload" 或 其它。
-
If you don’t already have a Mac Submission certificate, refresh your provisioning profiles to create it.
如果你还没有一个Mac 递交证书, 刷新probisioning profiles 来创建它。
-
Using Xcode, create an archive, validate it, and submit it to the Mac App Store.
使用Xcode, 创建一个压缩文件,验证它,然后提交到Mac 应用商店。
-
When your app is approved, use iTunes Connect to set the date when the app will be available to customers.
当你的应用程序审核通过,使用iTunes Connect 来设置应用程序的发布日期。
You use the Archives organizer in Xcode to validate and submit your app. First, you create an archive and sign it with the Mac Submission certificate. Then you validate the archive, which performs an automated check against the app in the archive as well as the information you provided in your iTunes Connect record. If problems are found during validation, you need to fix them before continuing.
使用Xcode中的Archives organizer 来验证和递交应用。 首先,创建一个压缩包并用Mac提交证书签名。 然后验证压缩包,它对压缩包中的应用程序和iTunes Connect record中的信息进行自动检查。如果在验证过程中发现了问题,你需要先更正了再继续。
Before you submit the app, you should read App Store Review Guidelines for Mac Apps to avoid problems. When you click the Distribute button and select “Submit to the Mac App Store,” Xcode transmits the archive to Apple, where it is examined to determine whether it conforms to the guidelines. If the app is rejected, correct the problems that were brought up during app approval and resubmit it.
在提交应用程序之前,你应该阅读App Store Review Guidelines for Mac Apps 文档来避免问题。 当你点击了Distribute(发布)按钮并选择了"Submit to the Mac App Store" 后, Xcode 把压缩包传送给(transmits)苹果,在那里它需要被检查是否符合各种准则。如果应用程序被驳回,更正问题后重新上传审核,该循环一直进行指导通过审核。
Use iTunes Connect to set a date when the app will be released to the Mac App Store. For example, you can choose a date that immediately releases the app to the Mac App Store after it is approved, or you can set a later date for sometime in the future. Using a later release date allows you to arrange other marketing activities around the launch of the app.
使用iTunes Connect 来设置应用程序发布的日期。比如,你可以在审核通过后,选择一个立即发布应用程序的日期,或者你也可以选择延后发布。 使用延后发布可以让你安排(arrange)应用程序发布的其它营销活动。
Note: If you want to distribute you application outside of the Mac App Store using your Developer ID certificate, read “Distributing Outside the Mac App Store” in App Distribution Guide.
注意: 如果你想在Mac 应用商店之外发布应用程序,你需要使用开发者ID证书,请参考App Distribution Guide 中的 “Distributing Outside the Mac App Store"。
Respond to User Issues
七、响应用户反馈
You can’t just submit the app to the Mac App Store and forget about it. You should expect to manage the app records and maintain the app throughout its lifetime. After your app is available on the Mac App Store, you need to monitor it, respond to user issues, and submit updates as needed.
你不能把应用程序发布到Mac应用商店之后就不再管它了。 你应该在应用程序的整个生命期管理应用程序记录并维护(maintain)该应用程序。 当应用程序在商店里出售了之后,你需要检测它,响应用户的反馈,并根据需要提交更新。
You want to pay attention to how users perceive the app. Customer ratings and reviews on the Mac App Store can have a big effect on the success of the app; if users run into problems, work quickly to determine the bug and submit a new version of the app through the approval process.
你想要关注用户如何注意到(perceive)你的应用程序。用户在Mac 应用商店里评价并反馈对应用程序的成功与否很关键;如果用户运行遇到问题,快速确定该bug并递交一个新的版本进行审核。
iTunes Connect provides data to help you determine how successful the app is, including sales and financial reports, customer reviews, and crash logs submitted to Apple by users. Crash logs are particularly important, because they represent significant problems users are seeing in the app. You should make investigating these reports a high priority.
iTunes Connect 提供了帮助你确定应用程序如何成功的各种数据,包括销售数据和财务报告,用户反馈,以及用户提交到苹果的崩溃记录。 崩溃记录尤其重要,因为它们表示用户在应用程序中发现了显著(significant)问题。 你应该高度重视这些报告。
All crash logs contain stack traces for each thread at the time of termination. To view a crash log, you need to open it from the Xcode Organizer window. As long as your Mac has the archive corresponding to the version of the app that generated the crash log, Xcode automatically resolves any addresses in the crash log with the actual classes and functions in the app.