续订iOS发行证书的正确方法

本文翻译自:Proper way to renew distribution certificate for iOS

My distribution certificate is expiring on June 7th, along with all of my provisioning files. 我的发行证书以及所有预配文件将于6月7日到期。 How do I properly renew it? 如何正确续约? Should I revoke it now and request a new one? 我现在应该撤销它并请求一个新的吗? If I do that than will all my live apps be taken down? 如果这样做,我所有的实时应用程序都将被删除吗?


#1楼

参考:https://stackoom.com/question/J99X/续订iOS发行证书的正确方法


#2楼

Your live apps will not be taken down. 您的实时应用程序不会被删除。 Nothing will happen to anything that is live in the app store. 应用商店中的任何内容都不会发生任何变化。

Once they formally expire, the only thing that will be impacted is your ability to sign code (and thus make new builds and provide updates). 一旦它们正式到期,唯一会受到影响的就是您签名代码的能力(从而进行新的构建并提供更新)。

Regarding your distribution certificate, once it expires, it simply disappears from the 'Certificates, Identifier & Profiles' section of Member Center. 关于您的发行证书,一旦过期,它就会从会员中心的“证书,标识符和配置文件”部分消失。 If you want to renew it before it expires, revoke the current certificate and you will get a button to request a new one. 如果您想在证书过期之前进行续订,请撤销当前证书,然后您将获得一个按钮来请求新证书。

Regarding the provisioning profile, don't worry about it before expiration, just keep using it. 关于配置文件,在到期前不用担心,只需继续使用它即可。 It's easy enough to just renew it once it expires. 过期后只需续订就足够了。

The peace of mind is that nothing will happen to your live app in the store. 您可以放心,商店中的实时应用程序不会发生任何事情。


#3楼

When your certificate expires, it simply disappears from the 'Certificates, Identifier & Profiles' section of Member Center. 当您的证书过期时,它会从会员中心的“证书,标识符和配置文件”部分中消失。 There is no 'Renew' button that allows you to renew your certificate. 没有“更新”按钮可让您更新证书。 You can revoke a certificate and generate a new one before it expires . 您可以吊销证书并在证书过期之前生成新证书 Or you can wait for it to expire and disappear, then generate a new certificate. 或者,您可以等待它过期并消失,然后生成一个新证书。 In Apple's App Distribution Guide : Apple的应用分发指南中

Replacing Expired Certificates 替换过期的证书

When your development or distribution certificate expires, remove it and request a new certificate in Xcode. 开发或发行证书过期后,将其删除并在Xcode中请求新证书。

When your certificate expires or is revoked, any provisioning profile that made use of the expired/revoked certificate will be reflected as 'Invalid'. 当您的证书过期或被吊销时,任何使用已过期/吊销的证书的配置文件都将显示为“无效”。 You cannot build and sign any app using these invalid provisioning profiles. 您无法使用这些无效的配置文件来构建和签名任何应用。 As you can imagine, I'd rather revoke and regenerate a certificate before it expires. 如您所料,我宁愿在证书过期之前撤消并重新生成证书。

Q: If I do that then will all my live apps be taken down? 问:如果这样做,我所有的实时应用程序都将被删除吗?

Apps that are already on the App Store continue to function fine. App Store中已存在的应用程序仍可以正常运行。 Again, in Apple's App Distribution Guide : 同样,在Apple的应用程序分发指南中

Important: Re-creating your development or distribution certificates doesn't affect apps that you've submitted to the store nor does it affect your ability to update them. 重要提示:重新创建开发或发行证书不会影响您已提交到商店的应用程序,也不会影响您更新它们的能力。

So… 所以…

Q: How to I properly renew it? 问:如何正确续约?

As mentioned above, there is no renewing of certificates. 如上所述,没有证书的续订。 Follow the steps below to revoke and regenerate a new certificate, along with the affected provisioning profiles. 请按照以下步骤撤消并重新生成新证书,以及受影响的配置文件。 The instructions have been updated for Xcode 8.3 and Xcode 9. 有关说明已针对Xcode 8.3和Xcode 9更新。

Step 1: Revoke the expiring certificate 步骤1:撤销即将到期的证书

Login to Member Center > Certificates, Identifiers & Profiles, select the expiring certificate. 登录会员中心 >证书,标识符和配置文件,选择过期证书。 Take note of the expiry date of the certificate, and click the 'Revoke' button. 记下证书的到期日期,然后单击“吊销”按钮。

选择过期的证书,然后单击“撤消”按钮

Step 2: (Optional) Remove the revoked certificate from your Keychain 步骤2 :(可选)从您的钥匙串中删除吊销的证书

Optionally, if you don't want to have the revoked certificate lying around in your system, you can delete them from your system. (可选)如果您不希望在系统中放置吊销的证书,则可以将其从系统中删除。 Unfortunately, the 'Delete Certificate' function in Xcode > Preferences > Accounts > [Apple ID] > Manage Certificates… seems to be always disabled, so we have to delete them manually using Keychain Access.app (/Applications/Utilities/Keychain Access.app). 不幸的是,似乎总是禁用Xcode>首选项>帐户> [Apple ID]>管理证书中的“删除证书”功能,因此我们必须使用Keychain Access.app(/ Applications / Utilities / Keychain Access手动将其删除。应用)。

(可选)使用Keychain Access.app删除吊销的证书

Filter by 'login' Keychains and 'Certificates' Category. 按“登录”钥匙串和“证书”类别过滤。 Locate the certificate that you've just revoked in Step 1. 找到您刚刚在步骤1中吊销的证书。

Depending on the certificate that you've just revoked, search for either 'Mac' or 'iPhone'. 根据您刚刚撤销的证书,搜索“ Mac”或“ iPhone”。 Mac App Store distribution certificates begin with “3rd Party Mac Developer”, and iOS App Store distribution certificates begin with “iPhone Distribution”. Mac App Store发行证书以“ 3rd Party Mac Developer”开头,iOS App Store发行证书以“ iPhone Distribution”开头。

You can locate the revoked certificate based on the team name, the type of certificate (Mac or iOS) and the expiry date of the certificate you've noted down in Step 1. 您可以根据小组名称,证书的类型(Mac或iOS)和您在步骤1中记下的证书的到期日期来查找已撤销的证书。

Step 3: Request a new certificate using Xcode 步骤3:使用Xcode申请新证书

Under Xcode > Preferences > Accounts > [Apple ID] > Manage Certificates…, click on the '+' button on the lower left, and select the same type of certificate that you've just revoked to let Xcode request a new one for you. 在“ Xcode”>“首选项”>“帐户”>“ [Apple ID]”>“管理证书…”下,单击左下角的“ +”按钮,然后选择您刚刚撤销的相同类型的证书,以允许Xcode为您请求新的证书。

让Xcode在Xcode>首选项>帐户> Apple ID>管理证书中为您请求新证书。

Step 4: Update your provisioning profiles to use the new certificate 步骤4:更新您的配置文件以使用新证书

After which, head back to Member Center > Certificates, Identifiers & Profiles > Provisioning Profiles > All. 之后,返回会员中心 >证书,标识符和配置文件>供应配置文件>全部。 You'll notice that any provisioning profile that made use of the revoked certificate is now reflected as 'Invalid'. 您会注意到,任何利用已撤销证书的配置文件现在都反映为“无效”。

请注意,任何利用已撤销证书的配置配置文件现在都反映为“无效”

Click on any profile that are now 'Invalid', click 'Edit', then choose the newly created certificate, then click on 'Generate'. 单击现在为“无效”的任何配置文件,单击“编辑”,然后选择新创建的证书,然后单击“生成”。 Repeat this until all provisioning profiles are regenerated with the new certificate. 重复此过程,直到使用新证书重新生成所有供应配置文件。

选择新创建的证书,然后单击生成

Step 5: Use Xcode to download the new provisioning profiles 步骤5:使用Xcode下载新的配置文件

Tip : Before you download the new profiles using Xcode, you may want to clear any existing and possibly invalid provisioning profiles from your Mac. 提示 :在使用Xcode下载新配置文件之前,您可能需要从Mac清除所有现有的可能无效的配置文件。 You can do so by removing all the profiles from ~/Library/MobileDevice/Provisioning Profiles 您可以通过从~/Library/MobileDevice/Provisioning Profiles删除所有配置~/Library/MobileDevice/Provisioning Profiles

Back in Xcode > Preferences > Accounts > [Apple ID], click on the 'Download All Profiles' button to ask Xcode to download all the provisioning profiles from your developer account. 返回Xcode>首选项>帐户> [Apple ID],单击“下载所有配置文件”按钮,要求Xcode从您的开发人员帐户下载所有配置文件。

单击“下载Xcode的所有配置文件”以下载所有新生成的配置文件


#4楼

This was a really a helpful thread, I followed the same steps as @junjie mentioned but for me something weird happened, the below are the steps I did. 这是一个非常有用的线程,我遵循了@junjie提到的相同步骤,但是对我来说,发生了一些奇怪的事情,以下是我执行的步骤。

  1. Went to developer portal and revoked the certificate which was about to expire. 进入开发者门户并吊销了即将到期的证书。
  2. Went to XCode6.4 and in the Account settings, the certificate still showed valid, I went crazy. 转到XCode6.4,在“帐户”设置中,证书仍然显示有效,我发疯了。
  3. Then I opened XCode7, there the certificate was shown with "Reset" button instead of create and I hit the reset button and later in the portal I was able to see an extended certificate present. 然后,我打开XCode7,那里的证书显示为“重置”按钮而不是“创建”,然后单击重置按钮,随后在门户中我可以看到存在的扩展证书。 This is what Apple says about Reset button 这就是Apple关于“重置”按钮的说法

If Xcode detects an issue with a signing identity, it displays an appropriate action in Accounts preferences. 如果Xcode检测到签名身份存在问题,则会在“帐户”偏好设置中显示适当的操作。 If Xcode displays a Create button, the signing identity doesn't exist in Member Center or on your Mac. 如果Xcode显示“创建”按钮,则在Member Center或Mac上不存在签名身份。 If Xcode displays a Reset button, the signing identity is not usable on your Mac—for example, it is missing the private key. 如果Xcode显示“重置”按钮,则签名身份在Mac上不可用-例如,它缺少私钥。 If you click the Reset button, Xcode revokes and requests the corresponding certificate. 如果单击“重置”按钮,Xcode将撤消并请求相应的证书。

  1. I tried creating an Appstore ipa with that, just to test and it worked fine so I am saved, but still not sure what has happened. 我尝试用它创建一个Appstore ipa,只是为了进行测试,并且效果很好,所以我被保存了下来,但仍然不确定发生了什么。 May be I had multiple accounts configured in my Mac, dont know. 可能是我在Mac中配置了多个帐户,不知道。

#5楼

Very simple was to renew your certificate. 很简单,就是续签您的证书。 Go to your developer member centre and go to your Provisioning profile and see what are the certificate Active and InActive and select Inactive certificate and hit Edit button then hit generate button. 转到开发人员成员中心,然后转到您的“供应”配置文件,查看有效证书和无效证书是什么,然后选择无效证书,然后单击编辑按钮,然后单击生成按钮。 Now your certificate successful renewal for another 1 year. 现在,您的证书可以成功续签一年。 Thanks 谢谢

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值