在 Xcode 5中查找供应配置文件

在 Xcode 5中,我可以获得 Xcode >> preferences >> accounts >> view details下的供应配置文件列表。我想复制配置文件,必须发送给我的客户之一,但我不能右键单击它找到它使用“ 在查找器中显示配置文件”选项。

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

enter image description here

116069 次浏览

check here:

~/Library/MobileDevice/Provisioning Profiles

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

Update:

For Terminal:

cd ~/Library/MobileDevice/Provisioning\ Profiles

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

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:

#!/bin/bash


if [ -z "$1" ] ; then
echo -e "\nUsage: $0 <myprovision>\n"
exit
fi


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


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


for i in $provisions ; do
match=$( diff "$1" "$provisionpath/$i" )
if [ "$match" = "" ] ; then
echo -e "\nmatch: $provisionpath/$i\n"
fi
done

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 'BEGIN{e=1;pat="<string>"tolower("iOS Team")}{cur=tolower($0);if(cur~pat &&prev~/<key>name<\/key>/){print FILENAME;e=0;exit};if($0!~/^\s*$/)prev=cur}END{exit e}' *

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

#!/bin/bash


if [ $# != 1 ] ; then
echo Usage: $0 \<start of provisioning profile name\>
exit 1
fi


read -d '' script << 'EOF'
BEGIN {
e = 1
pat = "<string>"tolower(prov)
}
{
cur = tolower($0)
if (cur ~ pat && prev ~ /<key>name<\\/key>/) {
print FILENAME
e = 0
exit
}
if ($0 !~ /^\s*$/) {
prev = cur
}
}
END {
exit e
}
EOF




awk -v "prov=$1" "$script" *

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

~/findprov "iOS Team"

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

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:

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

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

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

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

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".

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

  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 here In 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

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