ios 更新配置文件和证书
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12974900/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
renewing provisioning profile and certificates
提问by jpporterVA
I have 2 iOS certificates - one for development and one for distribution (App Store). Both are expiring in 2 weeks. I am on Xcode 4.4.1. I have 2 development provisioning profiles and 4 distribution provisioning profiles.
我有 2 个 iOS 证书 - 一个用于开发,一个用于分发(App Store)。两者都将在 2 周后到期。我在 Xcode 4.4.1 上。我有 2 个开发配置文件和 4 个分发配置文件。
In Xcode, I see that all of the provisioning profiles tied to the distribution certificate are set to expire in 2 weeks. I went into the Organizer->Provisioning Profiles and tried to Renew, but I received an error dialog indicating that "No value was provided for the parameter 'deviceids'". When I look on the Apple Provisioning Portal for that profile, it shows that the certificate is expiring in 2 weeks and that there are no devices associated with it (which is the way I've been doing it all along).
在 Xcode 中,我看到所有与分发证书相关的配置文件都设置为在 2 周后过期。我进入 Organizer->Provisioning Profiles 并尝试更新,但我收到一个错误对话框,指出“没有为参数‘deviceids’提供值”。当我在 Apple Provisioning Portal 上查看该配置文件时,它显示证书将在 2 周后到期,并且没有与之关联的设备(这是我一直以来的做法)。
So - I'm trying to renew these, and haven't done this before. Has anyone seen a similar error in Xcode? Do I need to renew my certificate first, and if so, how? I don't see any "create new certifcate" button on the Provisioning Portal or in Xcode.
所以 - 我正在尝试更新这些,之前没有这样做过。有没有人在 Xcode 中看到过类似的错误?我是否需要先更新我的证书,如果需要,如何更新?我在 Provisioning Portal 或 Xcode 中没有看到任何“创建新证书”按钮。
采纳答案by Jason McCreary
I had a similar problem after I recently renewed my certificate.
我最近更新了证书后遇到了类似的问题。
The following corrected the issues for my Development Provisioning Profile:
以下更正了我的开发配置文件的问题:
- Click Refreshin Xcode Organizer.
- Ensure the Code Signingbuild settings for your Projectand Targetare set to the proper Provisioning Profile. You should select iPhone Developerto avoid future issues.
- Optionally, remove expired profiles from Devicetab in Xcode Organizer.
- 点击刷新在Xcode的组织者。
- 确保您的项目和目标的代码签名构建设置设置为正确的Provisioning Profile。您应该选择iPhone Developer以避免将来出现问题。
- 或者,从Xcode Organizer 的Device选项卡中删除过期的配置文件。
The following corrected the issues for my Distribution Provisioning Profile:
以下更正了我的Distribution Provisioning Profile的问题:
- Log in to your iOS Developer Portal
- Go to the Distributiontab under Provisioning
- Create a new distribution profile.
- After the profile is generated, click Refreshin Xcode Organizer
- 登录您的iOS 开发者门户
- 转到Provisioning下的Distribution选项卡
- 创建新的分发配置文件。
- 配置文件生成后,在Xcode Organizer中点击Refresh
回答by jpporterVA
OK - I think I've fixed this. Here is what I did and it seems to work - when I upload the next release I'll know for sure.
好的 - 我想我已经解决了这个问题。这是我所做的,它似乎有效 - 当我上传下一个版本时,我肯定会知道。
- In X-Code, I deleted all of my provisioning profiles
- I then quit out of X-Code
- From the Development Portal, I revoked my developer and distribution certificates
- I created new keys using the Key Chain application
- Still in Key-Chain, I removed my old, soon to be expiring key/certificate
- Back on the Development Portal, I created new certificates
- Still on the Development Portal, I was able to edit all of my provisioning profiles and associate the correct new certificate to it
- I downloaded the new profiles
- I then followed this link's advice and worked around the apparent bug in X-Code to remove the old provisioning profiles from my project: Codesign error: Provisioning profile cannot be found after deleting expired profile
- Started X-Code back up and copied the provisioning profiles into Organizer
- Built for a device and tested OK.
- Built for IOS Device as though I'm preparing to upload to the AppStore and build was successful. I haven't tried uploading to the store.
- 在 X-Code 中,我删除了所有配置文件
- 然后我退出了 X-Code
- 从开发门户,我吊销了我的开发人员和分发证书
- 我使用 Key Chain 应用程序创建了新密钥
- 仍然在钥匙链中,我删除了我的旧钥匙/证书,即将到期
- 回到开发门户,我创建了新证书
- 仍然在开发门户上,我能够编辑我的所有配置文件并将正确的新证书与其关联
- 我下载了新的配置文件
- 然后我按照此链接的建议解决了 X-Code 中的明显错误,以从我的项目中删除旧的配置文件:代码 设计错误:删除过期配置文件后找不到配置文件
- 启动 X-Code 备份并将配置文件复制到 Organizer
- 专为设备构建并测试正常。
- 为 IOS 设备构建,好像我正准备上传到 AppStore 并且构建成功。我没试过上传到商店。
I actually did the steps twice, once for the development profiles and then once that worked/tested on my test devices, I modified the distribution profiles.
我实际上做了两次这些步骤,一次是针对开发配置文件,一次是在我的测试设备上运行/测试,我修改了分发配置文件。
These set X-Code up w/ no warning and Organizer now shows all my valid provisioning profiles that won't expire for another year. Hopefully, next year, if I don't forget these steps, I'll be able to do it a bit more quickly.
这些设置 X-Code 没有警告和管理器现在显示我所有有效的配置文件,这些配置文件不会再过期一年。希望明年,如果我不忘记这些步骤,我将能够更快地完成它。
回答by Sean
An easier way of doing it is ...
一个更简单的方法是......
My certificate had expired, so the renew button button in the Xcode Organizer did not work.
我的证书已过期,因此 Xcode Organizer 中的更新按钮不起作用。
I did the following:
我做了以下事情:
- logged into the iOS provisioning portal
- went to provisioning profiles > distribution
- clicked on each of the expired profiles and clicked edit
- the certificate radio button was unchecked because my certificate had expired, so I checked it and clicked generate
- you'll then be prompted to download the newly generated profile.... dont!
- wait about 5 minutes
- go into the Xcode Organizer > provisioning profiles and click refresh
- the profiles should then change from "expired" to "valid"
- 登录到 iOS 配置门户
- 转到配置文件 > 分发
- 单击每个过期的配置文件并单击编辑
- 证书单选按钮未选中,因为我的证书已过期,所以我选中它并单击生成
- 然后系统会提示您下载新生成的配置文件......不要!
- 等待大约 5 分钟
- 进入 Xcode Organizer > 配置文件并点击刷新
- 然后配置文件应从“过期”更改为“有效”