在 Xcode 5 中查找配置文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18849727/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:55:00  来源:igfitidea点击:

Find provisioning profile in Xcode 5

xcodeprovisioning-profilexcode5

提问by Ankur

In Xcode 5, I can get list of provisioning profiles under Xcode >> preferences >> accounts >> view details. I want to copy profile and have to send it to one of my client, but I am not able to right click on it to find it using "Reveal Profile in Finder" option.

在 Xcode 5 中,我可以在Xcode >> preferences >> accounts >> view details. 我想复制个人资料并将其发送给我的一位客户,但我无法使用“在 Finder 中显示个人资料”选项右键单击它以找到它。

How can I get specific provisioning profile in XCode 5 or do I have to download it from developer.apple every time?

如何在 XCode 5 中获取特定的配置文件,还是每次都必须从 developer.apple 下载?

enter image description here

在此处输入图片说明

回答by matzino

I found a way to find out how your provisioning profile is named. Select the profile that you want in the code sign section in the build settings, then open the selection view again and click on "other" at the bottom. Then occur a view with the naming of the current selected provisioning profile.

我找到了一种方法来了解您的配置文件的命名方式。在构建设置的代码签名部分选择您想要的配置文件,然后再次打开选择视图并单击底部的“其他”。然后出现一个视图,命名为当前选定的配置文件。

You can now find the profile file on the path:

您现在可以在路径上找到配置文件:

~/Library/MobileDevice/Provisioning Profiles

~/Library/MobileDevice/Provisioning Profiles

Update:

更新:

For Terminal:

对于终端:

cd ~/Library/MobileDevice/Provisioning\ Profiles

回答by yasirmturk

check here:

在这里检查:

~/Library/MobileDevice/Provisioning Profiles

回答by user23614

The following works for me at a command prompt

以下在命令提示符下对我有用

cd ~/Library/MobileDevice/Provisioning\ Profiles/
for f in *.mobileprovision; do echo $f; openssl asn1parse -inform DER -in $f | grep -A1 application-identifier; done

Finding out which signing keys are used by a particular profile is harder to do with a shell one-liner. Basically you need to do:

使用单行 shell 很难找出特定配置文件使用哪些签名密钥。基本上你需要做:

openssl asn1parse -inform DER -in your-mobileprovision-filename

then cut-and-paste each block of base64 data after the DeveloperCertificatesentry into its own file. You can then use:

然后将DeveloperCertificates条目后的每个 base64 数据块剪切并粘贴到其自己的文件中。然后您可以使用:

openssl asn1parse -inform PEM -in file-with-base64

to dump each certificate. The line after the second commonNamein the output will be the key name e.g. "iPhone Developer: Joe Bloggs (ABCD1234X)".

转储每个证书。输出中第二个commonName之后的行将是键名,例如“iPhone Developer: Joe Bloggs (ABCD1234X)”。

回答by user2962499

xCode 6 allows you to right click on the provisioning profile under account -> detail (the screen shot you have there) & shows a popup "show in finder".

xCode 6 允许您右键单击帐户下的配置文件-> 详细信息(您在那里的屏幕截图)并显示一个弹出窗口“在查找器中显示”。

回答by bvj

If it's sufficient to use the following criteria to locate the profile:

如果使用以下条件来定位配置文件就足够了:

<key>Name</key>
<string>iOS Team Provisioning Profile: *</string>

you can scan the directory using awk. This one-liner will find the first file that contains the name starting with "iOS Team".

您可以使用 awk 扫描目录。这个单行将找到包含以“iOS Team”开头的名称的第一个文件。

awk 'BEGIN{e=1;pat="<string>"tolower("iOS Team")}{cur=tolower(
#!/bin/bash

if [ $# != 1 ] ; then
    echo Usage: 
~/findprov "iOS Team"
\<start of provisioning profile name\> exit 1 fi read -d '' script << 'EOF' BEGIN { e = 1 pat = "<string>"tolower(prov) } { cur = tolower(
#!/bin/bash

if [ -z "" ] ; then
  echo -e "\nUsage: ##代码## <myprovision>\n"
  exit
fi

if [ ! -f "" ] ; then
  echo -e "\nFile not found: \n"
  exit
fi

provisionpath="$HOME/Library/MobileDevice/Provisioning Profiles"
provisions=$( ls "$provisionpath" )

for i in $provisions ; do
  match=$( diff "" "$provisionpath/$i" )
  if [ "$match" = "" ] ; then
    echo -e "\nmatch: $provisionpath/$i\n"
  fi
done
) if (cur ~ pat && prev ~ /<key>name<\/key>/) { print FILENAME e = 0 exit } if (##代码## !~ /^\s*$/) { prev = cur } } END { exit e } EOF awk -v "prov=" "$script" *
);if(cur~pat &&prev~/<key>name<\/key>/){print FILENAME;e=0;exit};if(##代码##!~/^\s*$/)prev=cur}END{exit e}' *

Here's a script that also returns the first match, but is easier to work with.

这是一个脚本,它也返回第一个匹配项,但更容易使用。

##代码##

It can be called from within the profiles directory, $HOME/Library/MobileDevice/Provisioning Profiles:

它可以从配置文件目录中调用,$HOME/Library/MobileDevice/Provisioning Profiles

##代码##

To use the script, save it to a suitable location and remember to set the executable mode; e.g., chmod ugo+x

要使用脚本,请将其保存到合适的位置并记住设置可执行模式;例如,chmod ugo+x

回答by ChenXin

You can use "iPhone Configuration Utility" to manage provisioning profiles.

您可以使用“iPhone 配置实用程序”来管理配置文件。

回答by user1467074

I wrote a simple bash script to get around this stupid problem. Pass in the path to a named copy of your provision (downloaded from developer.apple.com) and it will identify the matching GUID-renamed file in your provision library:

我写了一个简单的 bash 脚本来解决这个愚蠢的问题。将路径传递到您的供应的命名副本(从 developer.apple.com 下载),它将在您的供应库中识别匹配的 GUID 重命名文件:

##代码##

回答by pbaranski

It is not exactly for Xcode5 but this question links people who want to check where are provisioning profiles:
Following documentation https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

它并不完全适用于 Xcode5,但这个问题链接了想要检查配置文件
在哪里的人:以下文档https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html

  1. Choose Xcode > Preferences.
  2. Click Accounts at the top of the window.
  3. Select the team you want to view, and click View Details. enter image description hereIn the dialog that appears, view your signing identities and provisioning profiles. If a Create button appears next to a certificate, it hasn't been created yet. If a Download button appears next to a provisioning profile, it's not on your Mac. enter image description here
  1. 选择 Xcode > 首选项。
  2. 单击窗口顶部的帐户。
  3. 选择您要查看的团队,然后单击查看详细信息。 在此处输入图片说明在出现的对话框中,查看您的签名身份和配置文件。如果证书旁边出现“创建”按钮,则它尚未创建。如果“下载”按钮出现在预配描述文件旁边,则它不在您的 Mac 上。 在此处输入图片说明

Ten you can start context menu on each profile and click "Show in Finder" or "Move to Trash".

十您可以在每个配置文件上启动上下文菜单,然后单击“在 Finder 中显示”或“移至废纸篓”。