简体   繁体   English

通过Xcode在团队配置文件中自动刷新IOS设备

[英]Automatically refresh IOS devices in a team provisioning profile by Xcode

I have some IOS devices week by week to which I must send my apps for testing purposes during development. 我每周都会有一些IOS设备,在开发过程中必须将我的应用程序发送给我以进行测试。 These devices can't be pluuged to my computer, because they are far away from me and just for this case they won't be taken to my local machine. 这些设备无法插入我的计算机,因为它们离我很远,仅在这种情况下,它们不会被带到我的本地计算机上。 If plugging would be available, my life would be much easier. 如果可以使用插头,我的生活将会轻松得多。 But it is not the case. 但事实并非如此。

Now I have to do a lot of annoying things by hand: add it, regenereate it, delete it from local machine, add to new one etc etc. 现在,我必须手动做很多烦人的事情:添加,重新生成,从本地计算机中删除,添加到新计算机等。

After adding a device to my devices in Apple developer portal I'd like to have it in XCode without regenerating certificate, delete, download to my local machine. 将设备添加到Apple开发人员门户中的设备后,我希望将其包含在XCode中,而无需重新生成证书,删除,下载到我的本地计算机。 There should be some automatic refresh process. 应该有一些自动刷新过程。

Before XCode 4.5 there was an option in organizer to refresh it automatically by Xcode. 在XCode 4.5之前,管理器中有一个选项可以由Xcode自动刷新。

What about in the current XCode version? 在当前的XCode版本中呢?

In Xcode 4.5 same option to refresh is available. 在Xcode 4.5中,可以使用相同的刷新选项。

Steps To create Ad hoc Profile which is to be followed before the above process is done. 步骤完成上述过程之前,请遵循以下步骤创建临时配置文件。 Check this . 检查一下

Steps to refresh profile. 刷新配置文件的步骤。 1.In developer portal Add device. 1.在开发人员门户中添加设备。 2.Update Developer provisioning profile by adding the device to the profile. 2.通过将设备添加到配置文件来更新开发者配置文件。 3.Open Xcode> Organiser >Devices 4.Delete the old profile 3.打开Xcode>管理器>设备4.删除旧的配置文件

You will find a refresh button at the button click refresh. 您将在单击刷新按钮处找到一个刷新按钮。 Clean the project and Archive it. 清理项目并将其存档。 Send it to user, It will work on the new Device. 发送给用户,它将在新设备上运行。

@TechFanatic's solution didn't work for me. @TechFanatic的解决方案对我不起作用。

What did work was for me was: 对我来说工作是:

  1. From XCode, select XCode > Preferences. 在XCode中,选择XCode>首选项。
  2. Click the "Accounts" tab. 点击“帐户”标签。
  3. Select your account. 选择您的帐户。
  4. Click the "View Details..." button. 单击“查看详细信息...”按钮。
  5. Click the refresh button in the lower left corner. 单击左下角的刷新按钮。

This comes from the section "Refreshing Provisioning Profiles in Xcode" in Apple's documentation. 这来自Apple文档中的“刷新Xcode中的配置文件”部分。


EDIT: This no longer works in XCode 7. There is no "refresh" button that I have found anywhere in XCode 7. If you find one, please provide that answer. 编辑:这不再在XCode 7中工作。我在XCode 7中的任何地方都找不到“刷新”按钮。如果找到一个,请提供该答案。 In the meanwhile, there is a solution of sorts - you delete and recreate the managed profile. 同时,有一种解决方案 -删除并重新创建托管配置文件。

Specifically, if you are doing an Ad Hoc build: 具体来说,如果您要进行临时构建:

  1. In the member center , delete the "iOS Team Provisioning Profile" for your app. 成员中心中 ,为您的应用删除“ iOS Team Provisioning Profile”。 Do not delete the "XC Ad Hoc" provisioning profile. 不要删除“ XC Ad Hoc”供应配置文件。
  2. In XCode, in the XCode > Preferences menu, in the "Accounts" tab, under "View Details..." for your account, delete the "iOS Team Provisioning Profile" for your app by right-clicking and selecting "Move to Trash". 在XCode的“ XCode”>“首选项”菜单中,在“帐户”标签的“查看详细信息...”下,通过右键单击并选择“移至垃圾箱”,为您的应用删除“ iOS Team Provisioning Profile” ”。
  3. In the "General" tab for your Target, there will be a "Fix Issue" button. 在目标的“常规”选项卡中,将有一个“修复问题”按钮。 Click it. 点击它。
  4. Don't worry that the member center now says that your XC Ad Hoc provisioning profile is now invalid. 不用担心会员中心现在说您的XC Ad Hoc配给配置文件现在无效。 That will fix itself in a later step. 这将在以后的步骤中解决。
  5. Build your app. 构建您的应用。
  6. Archive your app. 存档您的应用。
  7. Export your app from the "Organizer". 从“整理器”中导出您的应用。
  8. Select "Save for Ad Hoc Deployment". 选择“保存以用于临时部署”。
  9. XCode will complain that your provisioning profile doesn't match or some such. XCode会抱怨您的配置文件不匹配或类似。 Click the "Reset" button and then click "Try Again". 单击“重置”按钮,然后单击“重试”。
  10. XCode should continue and create an .ipa file. XCode应该继续并创建一个.ipa文件。
  11. In the member center, your XC Ad Hoc provisioning profile will show up as active again. 在会员中心,您的XC Ad Hoc预置配置文件将再次显示为活动状态。

Simple, right? 简单吧?

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

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