提交App到Apple Store(Xcode4)
昨 天终于顺利把公司的App提交了,还是很开心的。这是我第一个开发超过2个月的项目,开发期间学到了很多东西,接下来的时间我会逐渐梳理一下。来个倒叙, 今天就先说下怎么提交的吧。Xcode4以后,提交过程变的简单,除了写各种应用描述以外,整个提交过程不需要半个小时。
发布App的准备工作要在itunesconnect进行,这里引导很好,一步步来就可以了。
SKU 随便写,只要唯一就可以了。
Bundle ID 通常是反序域名 eg. com.sinaapp.ppwithcc
Apple ID 这个是系统给的,我们的每个应用都有一个App id
https://itunesconnect.apple.com/

要说的重点是在Developer Provisioning Portal里的设置,有开发者账号的朋友对这个这个界面并不陌生,要想在真机上调试,这里的各种配置是免不了的。一开始往往被这里复杂的流程吓着。
确实很复杂,下面是苹果的官方文档。我就标记一下重点吧,实在是懒得重写一遍,而且我写的指定没有它的翔实全面。
DISTRIBUTION

The
distribution area of the iOS Provisioning Portal is where you will
prepare and learn how to submit your iPhone and/or iPod touch
application for delivery via in-house or Ad Hoc distribution. Only Team
Agents are authorized to prepare and submit applications for
distribution.
For information about distributing your application on the App Store, please see the App Store tab.
Obtaining your iOS Distribution Certificate
In
order to distribute your iOS application, the Team Agent is required by
Apple to create an iOS Distribution Certificate. Only the Team Agent
for your team will be able to create this certificate and only this
certificate will enable application submission.
Generating a Certificate Signing Request
To
request an iOS Distribution Certificate, you first need to generate a
Certificate Signing Request (CSR) utilizing the Keychain Access
application in Mac OS X Lion (Leopard). The creation of a
CSR will prompt Keychain Access to simultaneously generate your public
and private key pair establishing your iOS Distribution identity. Your
private key is stored in the login Keychain by default and can be viewed
in the Keychain Access application under the ‘Keys’ category. To
generate a CSR:
- In your Applications folder, open the Utilities folder and launch Keychain Access.
- In the Preferences menu, set Online Certificate Status Protocol (OSCP) and Certificate Revocation List (CRL) to “Off”.

- Choose
Keychain Access -> Certificate Assistant -> Request a Certificate
from a Certificate Authority. Note: If you have a private key
highlighted in the Keychain during this process, the resulting
Certificate Request will not be accepted by the Provisioning Portal.
Confirm that you are selecting “Request a Certificate From a Certificate
Authority…” and not selecting “Request a Certificate From a Certificate
Authority with <Private Key>…”
- In
the User Email Address field, enter your email address. Please ensure
that the email address entered matches the information that was
submitted when you registered as an iOS Developer. - In
the Common Name field enter your Company/Organization/Department name.
Please ensure that the name entered matches the information that was
submitted when you registered as an iOS Developer. - No CA Email Address is required.
- Select the ‘Saved to Disk’ radio button and if present, select ‘Let me specify key pair information’ and click ‘Continue’.

- If
‘Let me specify key pair’ was selected, specify a file name and click
‘Save’. In the following screen select ‘2048 bits’ for the Key Size and
‘RSA’ for the Algorithm. Click ‘Continue’.
- The Certificate Assistant will create a CSR file on your desktop.
Submitting a Certificate Signing Request for Approval
- After
creating a CSR, log in to the iOS Provisioning Portal and navigate to
‘Certificates’ -> ‘Distribution’ and click the ‘Add Certificate’
button. - Click
the Upload file button, select your CSR and click ‘Submit’. If the Key
Size was not set to 2048 bits during the CSR creation process, the
Portal will reject the CSR. - Approve your iOS Distribution Certificate.

Downloading and Installing iOS Distribution Certificates
- In
the ‘Certificates’–>’Distribution’ section of the Portal,
Control-Click the WWDR Intermediate Certificate link and select “Saved
Linked File to Downloads” to initiate download of the certificate. After
downloading, double-click the certificate to launch Keychain Access and
install. - In the same area of the Provisioning Portal, click on the name of the iOS Distribution Certificate to download.
- On your local machine, double-click the downloaded .cer file to launch Keychain Access and install your certificate.

Saving your Private Key and Transferring to Other Systems
//接下来的这一段是一个插曲,告诉我们可以把私钥保存起来,以备下次使用。这里功能是非常方便的,尤其是有多个人开发或者换了电脑。只要把.p12文件导入一遍,就可以直接用了,不需要重新进入这里设置什么。
It
is critical that you save your private key somewhere safe in the event
that you need to build your application on multiple Macs or decide to
reinstall your system OS. Without your private key, you cannot sign
binaries in Xcode and there you will be unable to upload your
application to the App Store or install your application on any Apple
device. When a CSR is generated, the Keychain Access application creates
a private key on your login keychain. This private key is tied to your
user account and cannot be reproduced if lost due to an OS reinstall. If
you plan to do development and testing on multiple systems, you will
need to import your private key onto all of the systems you’ll be doing
work on.
- To
export your private key and certificate for safe-keeping, open up the
Keychain Access Application and select the “Keys” category. - Highlight
the private key associated with your iOS Distribution Certificate and
select “Export Items” from the ‘File’ menu. Save your key in the
Personal Information Exchange (.p12) file format. - You will be prompted to create a password which will be used when you attempt to import this key on another computer.
- You
can now transfer this .p12 file between systems. Double-click on the
.p12 to install on a system. You will be prompted for the password you
first entered above.
Create and download your iOS Distribution Provisioning Profile for App Store Distribution
To
successfully build your application with Xcode for distribution via the
App Store, you first need to create and download an App Store
Distribution Provisioning Profile. These are different than the
Development Provisioning Profiles that were used earlier in that Apple
will only accept applications if they are built with an App Store
Distribution Provisioning Profile.
*/插曲结束
Note:
App Store provisioning profiles do not allow for a distribution built
application to be installed on an Apple device. To install your
distribution ready application on a device, you must create an Ad Hoc
provisioning profile.
- Team Agents should navigate to the Provisioning section of the Provisioning Portal and select the Distribution tab.
- Select the App Store radio button.
- Enter the name for your Distribution Provisioning Profile.
- Confirm your iOS Distribution Certificate has been created and is displayed.
- Select your wild-card App ID to build all of your applications with your single Distribution Provisioning Profile.
- Click ‘Submit’.
- Click on the name of the Distribution Provisioning Profile to download the .mobileprovision file.
- Drag the .mobileprovision onto the Xcode or iTunes icon in the dock to install.

Creating and Downloading a Distribution Provisioning Profile for Ad Hoc Distribution
To
successfully build your application in Xcode for Ad Hoc distribution,
you will need to create and download an Ad Hoc Distribution Provisioning
Profile.
- Team Agents should navigate to the ‘Provisioning’ section of the Provisioning Portal.
- Select the ‘Ad Hoc’ radio button.
- Enter the name for your Ad Hoc Distribution Provisioning Profile.
- Confirm your iOS Distribution Certificate has been created and is displayed.
- Select the App ID for the application (or suite of applications) you wish to distribute.
- Select up to 100 UDIDs which you wish to run your application on.
- Click ‘Submit’.
- Click on the name of the Distribution Provisioning Profile to download the .mobileprovision file.
- Drag the .mobileprovision onto the Xcode or iTunes icon in the dock to install.

Building your Application with Xcode for Distribution
- Launch Xcode and open your project.
- If
you have not already done so, drag the Distribution Provisioning
Profile downloaded from the Provisioning Portal onto the Xcode or iTunes
icon in the dock (or, drag into ‘~/Library/MobileDevice/Provisioning
Profiles’ directory.) - Open
the Xcode project and Duplicate the “Release” configuration in the
Configurations pane of the project’s Info panel. Rename this new
configuration “Distribution”.

- In the Target Info window, select the ‘Build’ tab and set the ‘Configuration’ to ‘Distribution’

- In
the Target Info window, navigate to the ‘Build’ pane. Click the ‘Any
iOS Device’ pop-up menu below the ‘Code Signing Identity’ field and
select the iOS Distribution Certificate/Provisioning Profile pair you
wish to sign and install your code with. Your iOS Distribution
certificate will be in bold with the Provisioning Profile associated
with it in grey above. In the example below, ‘iOS Distribution : Example
Corp, Inc.’ is the Distribution Certificate and ‘My App Store
Distribution Provisioning Profile’ is the .mobileprovision file paired
with it.
Note:
If the private key for your iOS Distribution certificate is missing,
you will be unable to select the iOS Distribution
Certificate/Provisioning Profile pair and you will see the following.
Importing the private key for your iOS Distribution certificate will
correct this.
- In
the Properties Pane of the Target Info window, enter the Bundle
Identifier portion of your App ID. If you have used an explicit App ID
you must enter the Bundle Identifier portion of the App ID in the
Identifier field. For example enter com.domainname.applicationname if
your App ID is A1B2C3D4E5.com.domainname.applicationname. If you have
used a wildcard asterisk character in your App ID, replace the asterisk
with whatever string you choose.
Here are example App IDs and what should be input into the Identifier field in Xcode.
- Example App ID: A1B2C3D4E5.com.domainname.applicationname
Identifier to enter in Xcode: com.domainname.applicationname - Example App ID: A1B2C3D4E5.com.domainname.*
Identifier to enter in Xcode: com.domainname.<name_of_application_or_suite> - Example App ID: A1B2C3D4E5.*
Identifier to enter in Xcode: <full_reverse_dns_company_and_application_or_suite_name>
- Example App ID: A1B2C3D4E5.com.domainname.applicationname
- In
the project window, select the Distribution Active Configuration from
the overview popup and set the Active SDK to the desired Device.
For App Store Distribution, skip to Step 12. For Ad Hoc Distribution, complete the following: - In the File Menu, select New File -> iPhone OS -> Code Signing -> Entitlements.

- Name the file “Entitlements.plist” and click ‘Finish’. This creates a copy of the default entitlements file within the project.

- Select the new Entitlments.plist file and uncheck the “get-task-allow” property. Save the Entitlements.plist file.

- Select
the Target and open the Build settings inspector. In the ‘Code Signing
Entitlements’ build setting, type in the filename of the new
Entitlements.plist file including the extension. There is no need to
specify a path unless you have put the Entitlements.plist file somewhere
other than the top level of the project.

- Click
‘Build’. (Note: Your binary must contain a flattened, square-image icon
that is 57×57 pixels. This icon is displayed on the iPhone or iPod
touch home screen.) - Highlight the app located within the “Products” sub-folder and select ‘Reveal in Finder’ from the Action popup.

- Use
the compress option in Finder to create a .zip file containing your
application. Be sure to compress only the .app file only and not the
entire build folder.

Verifying a Successful Distribution Build
To confirm your build was successful, check for the following:
- Open
the Build Log detail view and confirm the presence of the
“embedded.mobileprovision” file. This will take you to the line in the
build log that shows the provisioning profile was successfully called.
Ensure that the embedded.mobileproviion is located in the proper
“Distribution” build directory and is not located in a “Debug” or
“Release” build directory. Also, confirm that the destination path (at
the very end of the build message) is the app you are building.

- Search
for the term “CodeSign” in the Build Log detail view – this will take
you to the line in the build log that confirms your application was
signed by your iOS Certificate.
If your project is lacking any of the above files or pointing to the wrong directory, do the following:
- Select the Target and open the Build Settings Inspector. Confirm you are in the Distribution Configuration.
- Delete the Code Signing Identity: iOS Distribution : COMPANYNAME
- In the Xcode Build Menu, select Clean all Targets.
- Delete any existing build directories in your Xcode project using Finder.
- Re-launch Xcode and open your Project.
- Re-enter the code-signing identity iOS Distribution : COMPANYNAME in the Target Build Settings Inspector.
- Rebuild your Project.
Updating your Application
The
App Store uses three pieces of information in your application to
identify a submission as an update to an existing application. *When you
are submitting an update of your application to iTunes Connect for App
Store distribution, make sure to:
- Use the same Distribution Provisioning Profile to build each new version of your application
- Increment
the CFBundleVersion and CFBundleShortVersionString values in your
project Info.plist file. Note: Version numbers must be period-delimited
sequences of positive integers (1.0 to 1.1, or 2.2.1 to 2.2.2).

都设置好了的话,就可以准备分发了。Xcode4下,点击Project-Archive, 程序编译好后就出现了下面的界面

左边是程序的相关信息,右边是我们要进行的两个操作
1.首先是要 Validate 一下我们准备好的程序,会连接itunesconnnet进行验证。验证通过后程序的状态会变为 Passed Validation。吼吼,这样第一步就成功了。
2.
然后就是准备Distribute了,注意选好相应的证书。然后选择是提交到App Store,
接下来就是静静等待上传,上传成功后程序状态变为上图中的Submitted状态。到这时候还不算是提交成功了,还得登上itunesconnect看看
App的状态是不是waiting review。我第一次提交的时候就遇到了上传成功,但是binary file有问题的情况。
今天先写到这里,下次提交的时候再补充吧。
摘自:http://765i.cn/?p=256
提交App到Apple Store(Xcode4)的更多相关文章
- 苹果App Store提交app审核时EULA(终端用户软件使用条款)的注意事项等政策解读
写在前面,今天是2014年10月14日,以下内容可能会随着时间的推进而失效,请注意时效性 当在App Store提交app审核的时候,苹果通常会要求开发者提供一个EULA,苹果默认提供了一个,地址: ...
- [App Store Connect帮助]七、在 App Store 上发行(3.1)提交至“App 审核”:提交 App 以供审核
将您的 App 提交至“App 审核”,从而开始审核流程,以便使您的 App 在 App Store 上可用. 但是,在您能够上传 App 至“App 审核”前,您必须提供所有必填的元数据并为该版本选 ...
- 教程Xcode 下编译发布与提交App到AppStore
The proplem of Prepare for Upload for App store upload Application App store 增加新应用的步骤. 1. 访问iTunesCo ...
- 教程Xcode 4下编译发布与提交App到AppStore
地址:http://www.cocoachina.com/bbs/simple/?t55825.html 教程Xcode 4下编译发布与提交App到AppStore 先说一下这个是我在网上看到的一个帖 ...
- iOS之Xcode提交App中断出现:Cannot proceed with delivery: an existing transporter instance is currently uploading this package
https://www.jianshu.com/p/6d465a0ea58e 这句英文翻译过来就是: 无法继续交付:现有的传输程序实例目前正在上载此包 原因:上传的动作被记录在UploadToken中 ...
- 极路由访问Apple Store可以浏览但是不能下载的解决方案
最近在家里上网突然发现Apple Store不能更新了.重启路由器发现最开始一会是能下载更新的,但是过了一会就完全不能下载更新了.很是奇怪,今天特意分析了一下这个问题. 首先,抓包确定Apple St ...
- XE7 提交 App(iOS 8)提示「does not contain the correct beta entitlement」问题修复
XE7 提交 App 后,在「Prerelease」里被提示了: Build 1.0.0 does not contain the correct beta entitlement. For more ...
- 新ITC提交APP常见问题与解决方法(Icon Alpha,Build version,AppIcon120x120)(2014-11-17)
1)ICON无法上传.提示图片透明(有Alpha通道) 苹果如今不接受png里的Alpha了.提交的图标带有Alpha通道就提示: watermark/2/text/aHR0cDovL2Jsb2cuY ...
- 建议:一般地,建议使用xcode 4.3开发app 而不是使用xcode4.5
建议:一般地,建议使用xcode 4.3开发app 而不是使用xcode4.5 因为,xcode4.5 默认的sdk 是ios6.0,这里面有很多新特性.比如,Autolayout 等,这个特性再io ...
随机推荐
- MFC原创:三层架构01(人事管理系统)DAL
VC++/MFC Window编程原创教程文件夹 C++课程设计来着.但还没学过数据,也还没理解过三层架构,就把这个作业深化点来做了.尽管要做的这个人事管理系统看起来是挺简单的,无非就是处理员工信息. ...
- SOA——面向服务的体系架构
上一篇博文中提到了"紧耦合"的现象.怎样解决?SOA.採用面向服务的体系架构. 一.What? SOA=Service-oriented Architecture面向服务的体系结构 ...
- CF 61E 树状数组+离散化 求逆序数加强版 三个数逆序
http://codeforces.com/problemset/problem/61/E 题意是求 i<j<k && a[i]>a[j]>a[k] 的对数 会 ...
- Spring注解的使用和区别:@Component、@Service、@Repository、@Controller
Spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository.@Service 和 @Controller.在目前的 Spring ...
- [ES6] Function Params
1. Default Value of function param: The function displayTopicsPreview() raises an error on the very ...
- HashMap学习笔记
概述 HashMap是Map接口的一个哈希表的实现,内部是一个数组表示的.数组中的元素叫做一个Node,一个Node可以一个是一个简单的表示键值对的二元组,也可以是一个复杂的TreeNod ...
- 输入一个字符串,输出时数字倒序。例如:输入"hello2345wo7654",输出则为"hello5432wo4567"
public class ReserveString { public static void main(String[] args) { System.out.println("Pleas ...
- Action<T> 和 Func<T> 委托
概述: 除了为每个参数和返回类型定义一个新委托类型之外,可以使用Action<T> 和 Func<T> 委托. Action<T> Action<T>委 ...
- url编码方法(暂时知道是什么
var a="https://i.cnblogs.com/EditPosts.aspx?opt=1" encodeURI(a); encodeURIComponent(); dec ...
- AVL树相关操作
#include <iostream> using namespace std; //AVL树的节点 template<typename T> class TreeNode { ...