ios Xcode 7 如何刷新配置文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32724957/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 7 how do you refresh provisioning profiles?
提问by user2285278
In Xcode 6 you would click on Xcode -> Preferences -> Account -> View Details -> then there would be a little circular arrow. That is gone and there is now a "Download All" button that when pressed does not reload your provisioning profiles.
在 Xcode 6 中,您可以点击 Xcode -> Preferences -> Account -> View Details -> 然后会有一个小的圆形箭头。那已经消失了,现在有一个“全部下载”按钮,按下时不会重新加载您的配置文件。
I've even tried deleting my account and re-adding it. Still no good.
我什至尝试删除我的帐户并重新添加它。还是不行。
回答by macserv
Xcode 7 should automatically refresh your profiles locally when a change occurs to a profile in the Developer Portal. However, you can force this to occur by deleting and re-downloading the profiles.
当 Developer Portal 中的配置文件发生更改时,Xcode 7 应在本地自动刷新您的配置文件。但是,您可以通过删除并重新下载配置文件来强制执行此操作。
Begin by opening Xcode's preferences window (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. Then, right-click one of the selected profiles, and choose "Move to Trash" from the contextual menu.
首先打开 Xcode 的首选项窗口 ( Command+ ,)。选择“帐户”选项卡,然后单击“查看详细信息...”按钮。在出现的底部列表中,Shift+单击或单击+拖动以选择您要刷新的配置文件。然后,右键单击选定的配置文件之一,并从上下文菜单中选择“移至废纸篓”。
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. If you believe that this is the case, it may help to restart Xcode.
个人资料不删除?根据下面评论中的反馈,如果您删除了大量配置文件,Xcode 可能看起来什么都不做,尽管实际上已删除了所有选定的配置文件。如果您认为是这种情况,那么重新启动 Xcode 可能会有所帮助。
Be sure to take care when selecting profiles to delete… if they're not in the portal (e.g., they were supplied by another developer), Xcode can't automatically get them back for you. If you accidentally delete such a profile, you can find it in the Trash.
在选择要删除的配置文件时一定要小心……如果它们不在门户中(例如,它们是由其他开发人员提供的),Xcode 无法自动为您取回它们。如果您不小心删除了这样的配置文件,您可以在废纸篓中找到它。
回答by YMonnier
You can delete directly your Provisioning Profiles by running:
您可以通过运行以下命令直接删除您的配置文件:
rm /Users/[userName]/Library/MobileDevice/Provisioning\ Profiles/*
rm /Users/[userName]/Library/MobileDevice/Provisioning\ Profiles/*
Then re-download your profiles, Xcode -> Preferences -> Account -> View details... -> Download All
然后重新下载你的配置文件,Xcode -> Preferences -> Account -> View details... -> Download All
Your list in Target -> Build settings -> Code signing -> Provisioning Profiles will be updated.
您在目标 -> 构建设置 -> 代码签名 -> 供应配置文件中的列表将被更新。
YM
元明
回答by dragonflyesque
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. 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). Nothing I did made it go away and XCode kept asking for the wrong provisioning profile.
我在 XCode 7 中包含多个项目的工作区遇到了这个问题。我的开发人员证书已过期,因此我需要获取一个新证书并将其重新分配给我的配置文件。这最终成为一个主要问题,因为过期的配置文件一直在抬头,并且不会自动更新。它实际上在 XCode->Preferences->Account->View Details 中列出了两次(我可能会补充说,这里没有刷新按钮,也没有上下文菜单)。我所做的一切都没有让它消失,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 中确实存在的刷新按钮来解决它。
回答by TheJeff
XCode8: There is one provisioning profile that still always shows "Download". No matter what - it's the share extension app group provisioning profile for distribution.
XCode8:有一个配置文件仍然总是显示“下载”。无论如何 - 它是用于分发的共享扩展应用程序组配置文件。
I've tried:
我试过了:
- 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"
- Deleting the apple id associated with the account, then re-adding my apple id. Then manually re-importing by downloading the provisioning profiles and dragging them into xcode - one still shows "Download"
- 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.
- 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"
- 删除“帐户”选项卡“移至垃圾箱”中的所有配置文件,然后通过下载并将它们拖到 xcode 手动重新导入 - 仍然显示“下载”
- 删除与该帐户关联的Apple ID,然后重新添加我的Apple ID。然后通过下载配置文件并将它们拖到 xcode 中手动重新导入 - 一个仍然显示“下载”
- 在 Preferences->Accounts 下载配置文件仍然有问题,对我来说从来没有用。我是否支持代理并不重要。
- 通过删除 /Library/MobileDevice/Provisioning 配置文件中的文件夹来删除所有配置文件,然后通过下载配置文件并将它们拖到 xcode 中重新导入它们 - 一个仍然显示“下载”
Apple, please fix this. Thanks. :)
苹果,请解决这个问题。谢谢。:)
I'm wondering if there is a guid mismatch in the project file or something, or if reinstalling xcode will help at all. This worked in xcode7, but now I'm using xcode 8.
我想知道项目文件中是否存在 guid 不匹配或其他内容,或者重新安装 xcode 是否有帮助。这在 xcode7 中有效,但现在我使用的是 xcode 8。
UPDATE:The provisioning profiles were invalid but they weren't showing as invalid in the Apple Developer Site. 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. What a disaster.
更新:配置文件无效,但在 Apple Developer Site 中并未显示为无效。当我将“自动管理签名”切换为 true,然后再次切换回 false 时,它们显示为无效,然后修复它们+重新导入它们解决了问题。这悲剧。
回答by ocwang
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. There will be a download button you can click next to each updated provisioning profile.
如果您的配置文件已更改,则在您访问 Xcode -> Preferences -> Account -> View Details 后,XCode (7.0) 应自动获取更新的配置文件。您可以单击每个更新的配置文件旁边的下载按钮。
回答by Mike Lambert
As mentioned in one of the answers in Refresh devices in team provisioning profile managed by 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. (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 7 管理的团队配置文件中的刷新设备中的答案之一所述?,您可以在 Preferences->Accounts 面板中删除并重新添加 Apple ID,这应该会在 Developer Center 中重新生成 xcode 管理的团队配置文件。(其他答案建议右键单击配置文件,这对我不起作用,或者适用于答案不再适用的旧版 XCode。)
回答by i.AsifNoor
- Add your new device to provisioning profile.
- 将您的新设备添加到配置文件。
Sometimes XCode 7+ does not automatically refresh provisioning profile. I removed apple id from Xcode -> Preferences -> Account and then added again. There was download button instead of newly updated profile. Click download. Close XCode and open again. It should work perfectly.
有时 XCode 7+ 不会自动刷新配置文件。我从 Xcode -> Preferences -> Account 中删除了 apple id,然后再次添加。有下载按钮而不是新更新的配置文件。点击下载。关闭 XCode 并再次打开。它应该可以完美运行。