简体   繁体   English

Xcode 7如何刷新配置文件?

[英]Xcode 7 how do you refresh provisioning profiles?

In Xcode 6 you would click on Xcode -> Preferences -> Account -> View Details -> then there would be a little circular arrow. 在Xcode 6中,您可以单击Xco​​de - >首选项 - >帐户 - >查看详细信息 - >然后会出现一个小圆箭头。 That is gone and there is now a "Download All" button that when pressed does not reload your provisioning profiles. 这已经过去了,现在有一个“全部下载”按钮,按下时不会重新加载您的配置文件。

I've even tried deleting my account and re-adding it. 我甚至尝试删除我的帐户并重新添加它。 Still no good. 仍然没有好处。

Xcode 7 should automatically refresh your profiles locally when a change occurs to a profile in the Developer Portal. 当Developer Portal中的配置文件发生更改时,Xcode 7应自动在本地刷新您的配置文件。 However, you can force this to occur by deleting and re-downloading the profiles. 但是,您可以通过删除和重新下载配置文件来强制执行此操作。

Begin by opening Xcode's preferences window ( Command + , ). 首先打开Xcode的首选项窗口( Command + )。 Select the Accounts tab, and click the "View Details…" button. 选择“帐户”选项卡,然后单击“查看详细信息...”按钮。 In the bottom list that appears, Shift +click or click+drag to select the profiles you'd like to refresh. 在显示的底部列表中, 按住Shift并单击或拖动以选择要刷新的配置文件。 Then, right-click one of the selected profiles, and choose "Move to Trash" from the contextual menu. 然后,右键单击其中一个选定的配置文件,并从上下文菜单中选择“移至废纸篓”。

Xcode 7.0.1首选项>帐户>详细信息...

Once that's done, the "Download All" button should pull down fresh copies of everything in the Apple Developer portal. 完成后,“全部下载”按钮应下载Apple Developer门户中所有内容的新副本。

Profiles not deleting? 配置文件没有删除? Per feedback in the in the comments below, if you delete a very large number of profiles, Xcode may appear to do nothing, despite having actually removed all of the selected profiles. 根据下面评论中的反馈,如果您删除了大量的配置文件,Xcode可能看起来什么都不做,尽管实际上已经删除了所有选定的配置文件。 If you believe that this is the case, it may help to restart Xcode. 如果你认为是这种情况,重启Xcode可能会有所帮助。

Be sure to take care when selecting profiles to delete… if they're not in the portal (eg, they were supplied by another developer), Xcode can't automatically get them back for you. 选择要删除的配置文件时一定要小心......如果它们不在门户中(例如,它们是由其他开发人员提供的),Xcode无法自动为您取回它们。 If you accidentally delete such a profile, you can find it in the Trash. 如果您不小心删除了此类个人资料,可以在“已删除邮件”中找到该个人资料。

You can delete directly your Provisioning Profiles by running: 您可以通过运行直接删除您的配置文件:

rm /Users/[userName]/Library/MobileDevice/Provisioning\\ Profiles/*

Then re-download your profiles, Xcode -> Preferences -> Account -> View details... -> Download All 然后重新下载您的配置文件,Xcode - >首选项 - >帐户 - >查看详细信息... - >全部下载

Your list in Target -> Build settings -> Code signing -> Provisioning Profiles will be updated. 您的目标 - >构建设置 - >代码签名 - >供应配置文件中的列表将更新。

YM YM

I had this issue with a workspace containing multiple projects in XCode 7. My developer certificate had expired so I needed to get a new one and reassign it to my provisioning profile. 我在XCode 7中包含多个项目的工作区时出现此问题。我的开发人员证书已过期,因此我需要获取一个新的并将其重新分配给我的配置文件。 This ended up being a major problem because the expired provisioning profile kept rearing its ugly head and would not get updated automatically. 这最终成为一个主要问题,因为过期的配置文件不断变得丑陋,并且不会自动更新。 It was in fact listed in XCode->Preferences->Account->View Details twice (where, I might add, there was no refresh button and no contextual menu). 实际上它已经在XCode-> Preferences-> Account-> View Details中列出两次(其中,我可能会添加,没有刷新按钮,也没有上下文菜单)。 Nothing I did made it go away and XCode kept asking for the wrong provisioning profile. 我做的没有让它消失,XCode一直在询问错误的配置文件。

I finally solved it by deleting all of the profiles in ~/Library/MobileDevice/Provisioning Profiles, opening the workspace in XCode 6 and using the refresh button that DOES exist in XCode->Preferences->Account->View Details. 我最终通过删除〜/ Library / MobileDevice / Provisioning Profiles中的所有配置文件,在XCode 6中打开工作区并使用XCode-> Preferences-> Account-> View Details中存在的刷新按钮来解决它。

XCode8: There is one provisioning profile that still always shows "Download". XCode8:有一个配置文件仍然始终显示“下载”。 No matter what - it's the share extension app group provisioning profile for distribution. 无论如何 - 它是用于分发的共享扩展应用程序组配置文件。

I've tried: 我试过了:

  1. Deleting all provisioning profiles in the Accounts tab "Move to Trash", then manually re-importing by downloading and dragging them to xcode - one still shows "Download" 删除“帐户”选项卡“移至废纸篓”中的所有配置文件,然后通过下载并将其拖动到xcode手动重新导入 - 一个仍然显示“下载”
  2. Deleting the apple id associated with the account, then re-adding my apple id. 删除与该帐户关联的Apple ID,然后重新添加我的apple ID。 Then manually re-importing by downloading the provisioning profiles and dragging them into xcode - one still shows "Download" 然后通过下载配置文件并将它们拖到xcode中手动重新导入 - 一个仍然显示“下载”
  3. Downloading the provisioning profiles in the Preferences->Accounts is still really buggy and never works for me. 在首选项 - >帐户中下载配置文件仍然是真正的错误,从来没有对我有用。 It doesn't matter if I'm behind a proxy or not. 如果我不在代理之下并不重要。
  4. Deleting all provisioning profiles by removing the folder in /Library/MobileDevice/Provisioning profiles, then re-importing them by downloading the provisioning profiles and dragging them into xcode - one still shows "Download" 通过删除/ Library / MobileDevice / Provisioning配置文件中的文件夹删除所有配置文件,然后通过下载配置文件并将它们拖到xcode中重新导入它们 - 一个仍然显示“下载”

Apple, please fix this. Apple,请解决这个问题。 Thanks. 谢谢。 :) :)

I'm wondering if there is a guid mismatch in the project file or something, or if reinstalling xcode will help at all. 我想知道项目文件中是否存在guid不匹配,或者重新安装xcode会有所帮助。 This worked in xcode7, but now I'm using xcode 8. 这在xcode7中有效,但现在我正在使用xcode 8。

UPDATE: The provisioning profiles were invalid but they weren't showing as invalid in the Apple Developer Site. 更新:供应配置文件无效,但它们在Apple开发人员站点中未显示为无效。 When I toggled "automatically manage signing" to true, then back to false again, they showed up as invalid, then fixing them + re-importing them fixed the problem. 当我将“自动管理签名”切换为true,然后再次返回false时,它们显示为无效,然后修复它们+重新导入它们修复了问题。 What a disaster. 这悲剧。

Make sure you've actually changed your provisioning profile. 确保您确实更改了配置文件。 I ran into this same issue when I was trying to add a device to a provisioning profile. 当我尝试将设备添加到配置文件时,我遇到了同样的问题。 I added the device to my developer account, but had forgot to take the next step and add the device to my provisioning profile. 我将设备添加到了我的开发者帐户,但忘记了下一步并将设备添加到我的配置文件中。

If your provisioning profile has changed, XCode (7.0) should automatically grab the updated provisioning profile once you visit Xcode -> Preferences -> Account -> View Details. 如果您的配置文件已更改,则一旦您访问Xcode - >首选项 - >帐户 - >查看详细信息,XCode(7.0)应自动获取更新的配置文件。 There will be a download button you can click next to each updated provisioning profile. 您可以在每个更新的配置文件旁边单击下载按钮。

As mentioned in one of the answers in Refresh devices in team provisioning profile managed by Xcode 7? 正如Xcode 7管理的团队配置文件中的刷新设备中的一个答案中所提到的那样 , you can just delete and re-add the Apple ID in the Preferences->Accounts panel, which should regenerate the xcode-managed team provisioning profiles in the Developer Center. ,您只需在首选项 - >帐户面板中删除并重新添加Apple ID,该面板应在开发人员中心重新生成xcode管理的团队配置文件。 (Other answers suggest to right-click provisioning profiles, which doesn't work for me, or apply to older versions of XCode for which the answers no longer apply.) (其他答案建议右键单击配置文件,这对我不起作用,或适用于答案不再适用的旧版XCode。)

  1. Add your new device to provisioning profile. 将新设备添加到配置文件。

Sometimes XCode 7+ does not automatically refresh provisioning profile. 有时,XCode 7+不会自动刷新配置文件。 I removed apple id from Xcode -> Preferences -> Account and then added again. 我从Xcode - > Preferences - > Account中删除了apple id,然后再次添加。 There was download button instead of newly updated profile. 有下载按钮而不是新更新的配置文件。 Click download. 点击下载。 Close XCode and open again. 关闭XCode并再次打开。 It should work perfectly. 它应该完美。

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

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