为开发Xcode配置新设备 [英] Provisioning New Device for Development Xcode

查看:83
本文介绍了为开发Xcode配置新设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名新的iOS开发人员,虽然我过去在Xcode中成功配置了一个开发设备,但我刚刚获得了一个新设备,并且很难让Xcode配置它并允许我测试应用程序。

I am a new iOS developer, and although I have been successful in provisioning a device for development in Xcode in the past, I just obtained a new device and am having an awful time getting Xcode to provision it and allow me to test applications on it.

当我将新设备连接到Xcode时,Xcode会识别并正确识别设备,但是当我运行应用程序时,我收到以下错误消息: 找不到此可执行文件的有效配置文件。

When I connect the new device to Xcode, Xcode does recognize and identify the device correctly, however when I run the application I get the following error message: "A valid provisioning profile for this executable was not found."

根据Apple文档,我应该首先使用以下步骤在Xcode中请求开发证书:

According to the Apple documentation, I am supposed to first request a development certificate in Xcode using the following steps:


  1. 选择窗口>管理器>设备

  2. 选择配置文件。

  3. 单击窗口底部的刷新按钮。

  4. 输入您的用户名和密码,然后单击登录。

  5. 在您之后登录到您的帐户,会出现提示,询问Xcode是否应该请求你的开发证书。

  1. Choose Window > Organizer > Devices
  2. Select Provisioning Profiles.
  3. Click the Refresh button at the bottom of the window.
  4. Enter your user name and password and click Log in.
  5. After you sign in to your account, a prompt appears, asking whether Xcode should request your development certificate.

我反复按照步骤1 - 4进行操作,每次Xcode崩溃,然后我才能获得到第5步。我已经尝试完全关闭xcode,分离设备,清理项目,重新启动计算机等。有没有其他方法可以在Xcode之外申请开发证书?

I have followed steps 1 - 4 repeatedly and each and every time Xcode crashes before I can get to step 5. I have tried completely closing xcode, detaching device, cleaning project, restarting computer, etc. Is there another way to request a development certificate outside of Xcode?

好的,然后文档说我应该配置设备(授予我假设这一步取决于我无法实现的上一步的成功,但无论如何我都尝试过)使用以下步骤:

Ok so then the docs say I should provision the device (granted I assume this step is contingent upon the success of the previous step which I cannot achieve, but I tried it anyway) using the following steps:


  1. 将您的设备连接到Mac。

  2. 打开设备管理器

  3. 选择您的iOS设备。

  4. 单击用于开发按钮。第一次向帐户添加设备ID时,Xcode会使用iOS通配符应用程序ID,开发证书和设备ID创建iOS团队配置文件。 iOS Team Provisioning Profile也安装在您的iOS设备上。如果过去使用该设备进行开发,则可能不会显示用于开发按钮。如果发生这种情况,请点击屏幕底部的添加到门户网站。

  1. Connect your device to your Mac.
  2. Open the Devices organizer
  3. select your iOS device.
  4. Click the "Use for Development" button. The first time you add a device ID to your account, Xcode creates the iOS Team Provisioning Profile using the iOS Wildcard App ID, your development certificate, and the device ID. The iOS Team Provisioning Profile is also installed on your iOS device. If the device was used for development in the past, the "Use for Development" button may not appear. If this happens, click "Add to Portal" at the bottom of the screen instead.

所以用于开发 按钮没有出现(它出现在我第一次尝试这个并且之后没有),所以我点击了添加到门户网站按钮。每次我这样做,Xcode崩溃。

我目前已将代码签名标识设置为iPhone Developer(我的名字)。我也试过将它设置为iPhone Developer,甚至是Do Not Code Sign。我也去了iOS开发中心并在那里添加了设备(不确定我是否需要这样做)。

I currently have the code signing identity set to iPhone Developer (my name). I have also tried setting it just to iPhone Developer and even Do Not Code Sign. I also went to the iOS dev center and added the device there (not sure if I needed to do that or not).

在任何情况下,任何人都可以建议我可能遗漏的任何东西或任何其他方法吗?

In any case, can anyone suggest anything I might be missing or any other approach?

推荐答案


我也去了iOS开发中心并在那里添加了设备(不确定我是否需要这样做)。

I also went to the iOS dev center and added the device there (not sure if I needed to do that or not).

您需要在那里添加设备。

You need to add the device there.

添加设备后需要遵循的步骤:

Steps You need to follow after adding device:


  1. 接下来再次重新下载移动配置文件。

  1. Next re-download the mobile provisioning profile again.

转到管理器并删除您拥有的旧移动设备配置文件。

Go to organizer and delete the old mobile provisioning profile you had.

Double点击您刚刚下载的新移动设备配置文件,并查看它是否显示在整理器上。

Double click the new mobile provisioning profile you just downloaded and see that it appears on the organizer.

连接您的设备,您应该看到设备名称而不是iOS设备。

Connect your device and you should see your device's name instead of iOS device.

希望这有帮助。

这篇关于为开发Xcode配置新设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆