将 iPhone 应用程序上传到 Apple Store

发布于 2024-07-30 15:00:13 字数 352 浏览 2 评论 0原文

我试图将我的应用程序上传到苹果商店,但遇到了一些问题。 首先,我使用 iPhone SDK 2.2.1 制作了我的应用程序,然后升级到了 SDK 3。 然后,我从钥匙串访问生成了一个证书,并用它来生成配置文件。 当我将构建 SDK 从模拟器更改为设备时,我收到了该错误 “代码签名错误:身份‘iPhone Distribution’与默认钥匙串中的任何有效证书/私钥对不匹配”。 我对此有一些疑问: 我可以在没有设备连接到我的 Mac 的情况下执行这些步骤吗? 因为我现在没有可用的设备。 我需要对目标构建选项执行哪些更改? 出现该错误的可能原因是什么?

我非常感谢你的帮助。 提前致谢,

莎拉

I was trying to upload my app to the apple store and I faced some problems.
First I made my app using iPhone SDK 2.2.1 then I upgraded to SDk 3.
Then I generated a certificate from the keychain access and used it to generate the profile.
when I changed the build SDK from simulator to device I got that error
"Code Sign error: The identity 'iPhone Distribution' doesn't match any valid certificate/private key pair in the default keychain".
I have some questions regarding that:
Can I make these steps without having a device connected to my mac? Because I don't have a device available right now.
What are the changes I need to perform on the target build options?
what is the possible reason for having that error?

I would very much appreciate your help.
thanks in advance,

Sarah

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

以酷 2024-08-06 15:00:13

代码签名步骤是出了名的繁琐和错误。 确保您完全准确地按照步骤从 Apple 获取证书和配置文件。 然后检查“代码签名身份”下的构建设置。

您不需要连接设备,尽管它可以方便地检查所有设备是否正常工作。 然而,我发现有时我需要手动编辑项目文件 - 您不需要这样做,特别是使用 3.xSDK,因为它在代码签名方面更好一些。

错误的可能原因是

1) 证书中的名称与项目中设置的名称不匹配。 然而3.0应该会自动匹配“iPhone distribution”,而不是那么挑剔精确匹配。

2) 您还没有将从苹果获得的证书添加到钥匙串中

。 3) 由于 XCode 中的错误,您的项目文件变得混乱并且配置文件设置错误。 不应该真的发生,但我发现自己有时会进入项目包内容并在文本编辑中编辑项目文件 - 不适合胆小的人,如果您尝试这样做,您应该进行备份。

4) 确保您从 Apple 获得的配置文件已正确安装在 xcode 中(在管理器窗口中查看)。

5)要检查它是否正常工作,尝试将其安装在设备上确实有帮助,尽管这并不是绝对必要的。 使用应用程序上传程序而不是 itunesconnect 网站来上传分发文件是另一个很好的检查,如果文件未正确签名,它应该反对。 (尽管我说过我在应用程序上传器方面遇到了麻烦,有时不得不使用网站上传)。

简而言之,您很有可能已经完成了所有正确的事情,只是遇到了 xcode 中的错误。 即使它看起来有效,但往往没有效果。 整个事情一团糟。 只需尝试重做这些步骤并更改 xcode 中的代码签名身份即可。 还要清除您不使用的所有旧配置文件,以减少 xcode 选择错误配置文件的机会。

The code signing step is notoriously fussy and buggy. Make sure you have followed the steps to get the certificate and profile from Apple absolutely exactly. Then check your build settings under 'code signing identity'.

You don't need a device connected though it is handy for checking it all worked. However I have found on occasion I've needed to edit the project file by hand - you shouldn't need to do that, especially with 3.xSDK as it is a bit better at the code signing stuff.

Possible reasons for the error are

1) a mismatch in the name that is in the certificate, vs the name that is set in your project. However 3.0 is supposed to automatically match 'iPhone distribution' and not be so fussy about an exact match.

2) You haven't added the certificate you got from apple to the keychain

3) Your project file has got confused and has wrong profile settings due to a bug in XCode. Shouldn't really happen but I find myself going into the project package contents and editing the project file in textedit sometimes - not for the faint of heart, and you should make a backup if you try this.

4) Make sure the profile you got from apple is installed properly in xcode (look in the organiser window).

5) To check that it works OK it does help to try installing it on a device, though it's not strictly necessary. Using the application uploader rather than the itunesconnect website to upload the distribution file is another good check, it should object if the file is not signed properly. (Though having said that I've had trouble with the app uploader and had to use the website upload sometimes).

The short version is there is a pretty good chance you've done everything right and just hit a bug in xcode. Even when it seems to have worked, it often hasn't. The whole thing is a mess. Just try redoing the steps and changing the code signing identity in xcode. Also clean out any old profiles you're not using, to give xcode less chance of picking the wrong one.

多情癖 2024-08-06 15:00:13

您实际上是否将证书和配置文件导入到您的钥匙串中? 如果没有,请从 Apple 下载文件,将它们添加到钥匙串访问应用程序,然后重试。

Did you actually import the certificate and profile into your keychain? If not, download the files from Apple, add them to the Keychain Access application, and try again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文