简体   繁体   English

iPhone配置文件问题

[英]iPhone provisioning profile problem

My iPhone application runs fine in the simulator. 我的iPhone应用程序在模拟器中运行良好。 I'm trying to deploy it onto a physical iPhone. 我正在尝试将其部署到物理iPhone上。 When I install the provisioning profile, my Organizer says "A signing identity matching this profile could not be found in your keychain." 当我安装配置文件时,我的管理器说“在您的钥匙串中找不到与此配置文件匹配的签名身份。”

I can't resolve this. 我无法解决这个问题。 What do I do? 我该怎么办?

A) Did you create a provisioning profile in the iPhone development portal? A)您是否在iPhone开发门户中创建了配置文件?

B) If so, does the name in the info.plist file match the appID you created in the portal and used to create that development profile (that is, if you had created an app id of "com.fredsgreatstuff.*" in the info.plist you'd replace "com.mycompany" with "com.fredsgreatstuff") B)如果是这样,info.plist文件中的名称是否与您在门户中创建的appID相匹配,并用于创建该开发配置文件(即,如果您在其中创建了应用程序ID为“com.fredsgreatstuff。*” info.plist你用“com.fredsgreatstuff”替换“com.mycompany”)

C) Did you set PRODUCT_NAME in the project settings for all targets (to something like "mygreatapp") C)您是否在所有目标的项目设置中设置了PRODUCT_NAME(类似于“mygreatapp”)

From the look of the error though you must have got the development cert wrong, or not downloaded the certificate from the portal generated after you uploaded your developer signing request. 从错误的外观来看,您必须使开发证书出错,或者在上传开发人员签名请求后未从门户网站下载证书。

The portal has pretty good instructions at this point (that didn't used to be the case), be very careful to follow every step to the letter. 门户网站目前有很好的指示(以前不是这样),要非常小心地遵循信中的每一步。

Make sure you've downloaded your certificate from the program portal. 确保您已从程序门户下载了证书。 Double-click on it to create a private-public key pair in Keychain Access. 双击它以在Keychain Access中创建私钥 - 公钥对。 The private key will be created when you download the cert and double-click on it. 下载证书并双击它时,将创建私钥。

If it does not, you might have to delete the certificate and create a new one. 如果没有,您可能必须删除证书并创建一个新证书。 Make sure the in the certificate signing request you create, your name is exactly as you've mentioned in the portal. 确保您创建的证书签名请求中的名称与您在门户网站中提到的完全一致。

Here is a really good website with a checklist on troubleshooting code signing errors: 这是一个非常好的网站,其中包含有关故障排除代码签名错误的清单:
http://www.drobnik.com/touch/2009/05/how-to-fix-code-signing-errors/ http://www.drobnik.com/touch/2009/05/how-to-fix-code-signing-errors/

Most of its content is covered by the posts above, but it is easier to work through. 上面的帖子涵盖了其大部分内容,但更容易完成。

FTR, I hit the same problem that Genericrich pointed out - my Development Profile didn't have the private key, but my Distribution one did. FTR,我遇到了Genericrich指出的同样问题 - 我的开发资料没有私钥,但是我的发布版本没有。 As a workaround I just defined my Debug build to also use the Development Profile. 作为一种解决方法,我只是将我的Debug构建定义为也使用开发配置文件。

Make sure you have your developer certificate installed on the machine, AND that your private key installed with it. 确保您在计算机上安装了开发人员证书,并确保随其安装了私钥。 You can check this in the Keychain Access tool in your Utilities folder. 您可以在Utilities文件夹中的Keychain Access工具中进行检查。 The cert should expand to a private key icon with your name on it. 证书应扩展为带有您姓名的私钥图标。

I had the same problem with Xcode 4.0 on SL. 我在SL上的Xcode 4.0遇到了同样的问题。

In the Organizer window, doing a "drag and drop" of the provisioning profile always gives a "Valid signing identity not found". 在“管理器”窗口中,执行配置文件的“拖放”始终会显示“未找到有效签名标识”。

You have to use the + (add) icon and search for your provisioning profile file to upload it on your device. 您必须使用+(添加)图标并搜索您的配置文件文件,以便将其上传到您的设备上。 It just worked for me (no need to reinstall all the stuff). 它对我有用(无需重新安装所有东西)。

It might be that the "keychain" into which you installed your certificate is not currently set as your "default keychain". 可能是您安装证书的“钥匙串”当前未设置为“默认钥匙串”。 I had the same (or very similar problems) when my default keychain was somehow switched to a different default. 当我的默认钥匙串以某种方式切换到不同的默认值时,我遇到了相同(或非常类似的问题)。

Open Keychain Access (Applications -> Utilities -> Keychain Access) 打开钥匙串访问(应用程序 - >实用程序 - >钥匙串访问)

On the top left list box called "Keychains" make sure the keychain into which you installed your developer certificate (usually "login") is still bold (ie: set to the default keychain). 在名为“Keychains”的左上方列表框中,确保您安装开发人员证书(通常是“login”)的钥匙串仍为粗体(即:设置为默认钥匙串)。

You can set the default keychain by right (or control) clicking on the keychain you want ("login" for example) and selecting the "Make Keychain 'xxx' Default". 您可以通过右键(或控制)单击所需的钥匙串(例如“登录”)并选择“使钥匙串'xxx'默认”来设置默认钥匙串。

Cheers. 干杯。

Deleting all expired provisioning profiles in Xcode organizer did the trick for me. 在Xcode组织器中删除所有过期的配置文件对我来说很有用。 After this I clicked on the Refresh button in the organizer and the provisioning profiles have been downloaded automatically. 在此之后,我单击了管理器中的“ 刷新”按钮,并自动下载了配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM