App Store App 提交/发布/测试

来源:互联网 发布:大数据 关联分析算法 编辑:程序博客网 时间:2024/05/16 00:31

菜鸡一只,欢迎指正。

半年前接触过一点 iOS 开发,做了个画板之类的东西,现在实习负责一款 APP 的开发和发布,不要问为什么,就一个人搞啊。

所以,一边读着 API 一边开始代码裁缝之路。觉得官方文档还是非常强大的,所以首先还是讲讲自己的一些使用经历,纯属记录。

在苹果开发者中心(https://developer.apple.com)的右上角的搜索栏,把你的问题键入,对于像我一样的菜鸡,一般都会可以让你满意的文档解答你的问题。而且在不同的类别下大多有一个叫 “Troubleshooting” 的栏目,基本上你在 Xcode 上碰到的一些常见错误都会有解释,直接 cmd+F 贴进来,看看苹果给你的官方解释吧。在搜索栏的下方,可以下载 PDF 当成英文阅读,嗯,如果你愿意的话~


进入正题吧,说说自己的发布过程。对于个人开发者账号,主要接触的就是两种发布:

一个是发布到 App Store 一个是发布到 Ad Hoc (Ad Hoc 是点对点的意思,源自拉丁语,意思是“for this”)。

我们先说发布所需要的几样东西:

1、Apple developer account 开发者账号

2、certificate 证书

3、provisioning file 配置文件

对于后两者,有两个分类,iOS Distribution 和 iOS Development 顾名思义一个是用于发布分配的,一个是用于开发的。我们只谈用于发布的 iOS Distribution 的一些信息。

Ad Hoc 点对点测试:

对于苹果,不像安卓那样可以“随随便便”成功,对于一些个人或者小创业团体,一个产品决定发布,可以先找一个内测托管平台发布测试(这里可以推荐一个 fir.im,简直是自干五......)。也就是可以导出一个 Ad Hoc 发布包。顾名思义,Ad Hoc 的发布包只能在已注册的测试设备进行安装运行。设备注册是在 developer centre 里面 Devices 里面进行注册。 


UUID 呢,可以通过连接到电脑后,在 iTunes 手机的 Summary 界面里面,疯狂的点击 Serial Number,会有神奇的实情发生,就可以发现了 UUID 了,之后粘贴复制贴到 Developer Centre 里面的 devices 里面就好了。当你发布 Ad Hoc 测试的时候,在生成provisioning file 的时候,有一个步骤选择测试用的设备,要记得的勾选相应的设备。因为一般的内测托管平台都是需要提交 Ad Hoc 的 .ipa 文件,之后一般的内测服务网站都会提供给你一些二维码啊短 url 之类的信息供你给你的内测成员分发。

App Store 发布:

如果觉得自己的 App 经过内测没有问题了,就可以准备提交 App Store 了。这个过程主要是在 iTunes Connect 和 Xcode 上面完成的。iTunes Connect 主要是完成 App 的描述,截图,版本好,开发者信息的填写,而且,当年你从 Xcode 提交了 App,可以在这里看到你提交了哪个 build 版本,可以选择不同的版本送去 review。


首先还是准备好你的证书,你的 Provisioning Profiles,这里 Provisioning Profile也是要配置好的,记得选 Distribution 到 App Store,之后双击安装。

Xcode 6.0以后可以直接在客户端提交到 App Store 了,好了,不要以为极品装备点击要送了,要在 Build Setting 里面设置 Code Signing 下面的 Provisioning Profile 设置为你刚刚安装的 Provisioning Profile,当然你也可以自信 Automatic,相信 Xcode 的智商。之后在 Product->Archive,选择 submit 之后就可以了。

以上是基本流程,但是就我本人来说,还是遇到了很多问题,这里我一边依据这官方文档中的 “troubleshooting” 里面的文档来说一下我的解决过程。



You’re Missing Signing Identities or Code-Signing Certificate

Xcode detects when you’re missing a signing identity, as needed, depending on the operation you’re performing. For example, if you attempt to run an app on an iOS device, a dialog may appear asking if Xcode should request a missing development certificate. If this happens, click Fix Issue or Request in the dialog that appears.

If the certificate already exists in Member Center, a “Your account already has a valid certificate” dialog appears. Typically, this happens when you move from one Mac to another. If possible, export your certificates as a developer profile file on the other Mac, and then import them on your new Mac, as described in Exporting and Importing Certificates and Profiles. If you don’t have a backup of your developer profile, click the “Revoke and Request” button when the “Your account already has a valid certificate” dialog appears.

You can also request specific types of certificates, as described in Requesting Signing Identities.

这个主要是证书的问题,个人建议遇见这种问题,打开 keychain 看看里面到底有没有报错的证书,如果有,那么也请删除,用 keychain 通过邮箱重新申请一遍,安装。当然,还要重新生成 provisioning profile 的。如果是你自己一个人的账号,那么请将有问题的 certificate revoke 掉,重新来过。

此外,还有一个东西可能影响到这个,就是.p12证书。你可以到其他运行正常的开发 Mac 上导出这个证书,安装到自己的 Mac 上。

No Such Provisioning Profile Was Found

If a “Your build settings specify a provisioning profile with […] however, no such provisioning profile was found.” warning message appears below the Team pop-up menu in the General pane, you may have incorrect Provisioning Profile and Code Signing Identity build settings from using an earlier version of Xcode. 

When this occurs, click the Fix Issue button below the warning message. If necessary, click the Fix Issue button again. The Provisioning Profile build setting should be None and the Code Signing Identity build setting should be Automatic and iOS Developer for iOS apps, and Automatic and Mac Developer for Mac apps.

If you’re using a custom development provisioning profile, read Using Custom Provisioning Profiles for how to configure your project.

这类问题我是真碰到了很多回,一共有以下几种:

provisioning profile 和 bundle id, certificate, UUID 不匹配。

对于 bundle id,在项目的 general 里面有 bundle id,注意在你申请provisioning profile 的时候选择相应的 bundle id,当然也可以选择“*”通配符。

主要是就上文提到的 code signing 那里没有设置对。另一方还有一个原因就是你的 certificate 和 provisioning Profile 里面的 id 不一样。解决办法其实也很简单,打开你的 keychain,看看里面带 distribution 的 id 是什么,在 developer centre 里面生成 provisioning profile 的时候,选相应的 id。

看到网上关于一些博客讲的是删除.xproject 里面的一些 uuid,我具体测试了一下,是有用的。 


大概先写到这里,有时间再把这里的一些经历详细说说。


0 0
原创粉丝点击