xcode 4.2,用于分发的代码签名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7797979/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:09:51  来源:igfitidea点击:

xcode 4.2, code signing for distribution

iphoneiosxcodecertificatecode-signing

提问by Daniel Nguyen

I have finished coding my app and have spent the last 2-3 days on figuring out why and what I am doing wrong with building an archive to be uploaded to apple app store.

我已经完成了我的应用程序的编码,并且在过去的 2-3 天里一直在弄清楚我在构建要上传到苹果应用程序商店的档案时为什么以及我做错了什么。

1 - I verified that my new app is in "Waiting for Upload" state.

1 - 我确认我的新应用处于“等待上传”状态。

2 - I have download and double click on the WWDR intermediate certificate. Verified that this exist in my key chains.

2 - 我已下载并双击 WWDR 中间证书。验证这存在于我的钥匙链中。

3 - I verified that my distribution certificate is not expired. It's expiration date is a year from today. Its status is "Issued"

3 - 我确认我的分发证书没有过期。它的有效期是从今天起一年。其状态为“已发行”

4 - I have created app id. I verified that the app name space portion is exactly the same as my application name space. The states that this app is in are: - push notification: configurable (yellow) - in app purchase: enable (green) (i want to turn this off, but there's no way to) - game center: enable (green) (i want to turn this off, but there's now way to) - iCloud: configurable (yellow)

4 - 我已经创建了应用程序 ID。我验证了应用程序名称空间部分与我的应用程序名称空间完全相同。该应用程序所处的状态是: - 推送通知:可配置(黄色) - 应用程序内购买:启用(绿色)(我想关闭它,但没有办法) - 游戏中心:启用(绿色)(我想关闭它,但现在有办法) - iCloud:可配置(黄色)

5 - I have verified that my distribution provision is "Active" for the correct application id.

5 - 我已验证我的分发条款对于正确的应用程序 ID 是“活动的”。

6 - i have downloaded and installed and installed all 3 where they belong: a - WWDR intermediate certificate b - Distribution certificate c - Distribution provisioning profile

6 - 我已经下载并安装并安装了它们所属的所有 3 个:a - WWDR 中间证书 b - 分发证书 c - 分发配置文件

I have Xcode 4.2 with IOS 5. I did an update on the app store for the latest version of XCODE 2 days ago.

我有带 IOS 5 的 Xcode 4.2。两天前我在应用商店更新了最新版本的 XCODE。

In Xcode -> organizer - Devices: under "Developer Profile" i have verified that I have the correct provision profile for distribution under "Provisioning Profiles" i have verified that I have the correct provision profile for distribution

在 Xcode -> Organizer - Devices: 在“Developer Profile”下,我已经验证我在“Provisioning Profiles”下有正确的provision profile for distribution 我已经验证我有正确的provision profile for distribution

in Xcode -> project -> build setting: i have verified that I specified the correct code signing provision under "Code signing Identity" for both debug and release type. debug: i point to my developer provision release: i point to my distribution provision

在 Xcode -> 项目 -> 构建设置中:我已经验证我在“代码签名身份”下为调试和发布类型指定了正确的代码签名条款。调试:我指向我的开发者供应版本:我指向我的分发条款

in Xcode -> target -> build setting i did the same as the project describe above.

在 Xcode -> 目标 -> 构建设置中,我做了与上面描述的项目相同的操作。

I left "Code signing entitlements" blank I left "code signing resource rules path" blank i left "other code signing flags" blank

我将“代码签名权利”留空 我将“代码签名资源规则路径”留空 我将“其他代码签名标志”留空

I modify the schema for "iOS device" for "archive", i specified: "release" under "build configuration" "nameOfMyApp" under "archive name" i have checked "reveal archive in organizer"

我修改了“档案”的“iOS设备”的架构,我指定:“构建配置”下的“发布”“档案名称”下的“nameOfMyApp”我已经检查了“在组织者中显示档案”

I made sure that my project is compile for all static library.

我确保我的项目是为所有静态库编译的。

I then click on "Product" -> "Archive"

然后我点击“产品”->“存档”

The project compiled, there was no compilation error. (i verified that my app ran on my iPhone)

项目编译通过,没有编译错误。(我确认我的应用程序在我的 iPhone 上运行)

Toward the end of the archiving a window for codesign pop up. the message says in exact letters: "codesign wants to sign using key "" in your keychain." I allow it. (is "" suppose to have some other name other than "key"?)

在存档快要结束时,会弹出一个用于协同设计的窗口。该消息以确切的字母表示:“codesign 想要使用钥匙串中的密钥“”进行签名。” 我允许。(“”是否应该有除“key”以外的其他名称?)

After I click allow, I see "build succeeded"

单击允许后,我看到“构建成功”

I go to the organizer -> Archives, I do not see any item under this section. the organizer shows "No Archives" for the left pane. and the main panel.

我转到组织者 -> 档案,我在此部分下没有看到任何项目。组织者在左窗格中显示“无档案”。和主面板。

I go to the path where the archive would be shown, I see the archived file, but the size is "Zero byte"

我转到将显示存档的路径,我看到存档文件,但大小为“零字节”

So I search this forum for help, and someone posted a link to a guide: https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933

所以我搜索这个论坛寻求帮助,有人发布了一个指南链接:https: //developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933

I went over this link in very good detail, but still NO luck.

我非常详细地浏览了这个链接,但仍然没有运气。

I've been on this issue for a very long time and it's driving me mad and crazy. There are no error returned, thus I have no idea how to fix this issue.

我已经在这个问题上很长时间了,它让我发疯。没有返回错误,因此我不知道如何解决这个问题。

Would someone help me out?

有人会帮我吗?

Also is there a phone number that apple provide to support issue like this? If there is, please provide it here.

还有苹果提供的电话号码来支持这样的问题吗?如果有,请在此处提供。

After 3 months of development, my app is done and just sitting on my computer and not on the app store. sigh......

经过 3 个月的开发,我的应用程序完成了,只是坐在我的电脑上,而不是在应用程序商店。叹......

回答by USS1994

The method you described deviates a little from the method that I just recently used. Try following this guide:

您描述的方法与我最近使用的方法略有不同。尝试遵循本指南:

http://www.touch-code-magazine.com/how-to-upload-an-app-to-the-app-store-with-xcode-4/

http://www.touch-code-magazine.com/how-to-upload-an-app-to-the-app-store-with-xcode-4/

It worked perfectly for me and seems to be a different method than what you did. It uses the xcode interface directly to go all the way through the upload process. (aka, you don't need to manually upload the file via your internet browser)

它对我来说非常有效,并且似乎与您所做的方法不同。它直接使用 xcode 接口完成上传过程。(也就是说,您不需要通过互联网浏览器手动上传文件)

EDIT:

编辑:

Also try: http://www.weston-fl.com/blog/?p=2442

也试试:http: //www.weston-fl.com/blog/?p= 2442

回答by Vincent Wegener

I had the same issue when I archived the app, I got the message "codesign wants to sign using key <key>in your keychain." <key>should have been 'my distribution certificate name', went to all the steps what could be wrong:

我在归档应用程序时遇到了同样的问题,我收到消息“代码设计想要使用钥匙<key>串中的密钥进行签名”。<key>应该是“我的分发证书名称”,执行所有步骤可能会出错:

  • distribution certificate was correct in keychain
  • deleted all old certificates
  • checked if the mobileprovision was valid in terminal
  • 钥匙串中的分发证书正确
  • 删除所有旧证书
  • 检查 mobileprovision 在终端中是否有效

but that didn't work. Finally contacted apple support and pointed me to https://developer.apple.com/legacy/library/technotes/tn2250/_index.html--> Configuration Troubleshooting

但这没有用。最后联系了苹果支持并指出我https://developer.apple.com/legacy/library/technotes/tn2250/_index.html--> 配置故障排除

Followed these steps (see for more details the link):

遵循以下步骤(有关更多详细信息,请参阅链接):

  • deleted all distribution certificates in keychain
  • also deleted provisioning profiles
  • revoked the certificate on the developer account site
  • created new certificate
  • renewed distribution provision files (on the site)
  • downloaded and dragged/dropped the new certificate and provision file in xcode
  • 删除钥匙串中的所有分发证书
  • 还删除了配置文件
  • 在开发者账号网站上吊销了证书
  • 创建了新证书
  • 更新的分发提供文件(在网站上)
  • 在 xcode 中下载并拖放新证书和配置文件

Note:In the troubleshoot session it says you can renew using Xcode, I did not work for me as I got the message that "There is already a certificate request pending", manually did the trick...

注意:在故障排除会话中,它说您可以使用 Xcode 续订,我没有对我来说有效,因为我收到了“已经有一个证书请求待处理”的消息,手动完成了这个技巧......

回答by pinxue

I had ever ran into similar issue which is because I installed xcode 4.0 after 4.2, it is solved by re-install xcode 4.2. You may have a try.

我曾经遇到过类似的问题,这是因为我在 4.2 之后安装了 xcode 4.0,它通过重新安装 xcode 4.2 解决了。你可以试试。

For technical support, you may request tsi (http://developer.apple.com/membercenter/index.action#techSupport)

如需技术支持,您可以请求 tsi (http://developer.apple.com/membercenter/index.action#techSupport)