Last active
November 25, 2022 04:15
-
-
Save mxpr/8208289a63ca4e3a35a4 to your computer and use it in GitHub Desktop.
Export Options Plist flag in xcodebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch xcrun to leverage Xcode 7 | |
# Note: This won't be needed once Xcode 7 is released | |
# and becomes the primary Xcode in use. | |
export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/ | |
# Export Archive | |
xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath /path/to/app.xcarchive -exportPath /path/to/app.ipa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>teamID</key> | |
<string>MYTEAMID123</string> | |
<key>method</key> | |
<string>app-store</string> | |
<key>uploadSymbols</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Archive | |
xcodebuild -scheme MyApp -archivePath builds/MyApp.xcarchive archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Switch xcrun to leverage Xcode 7 | |
# Note: This won't be needed once Xcode 7 is released and is the | |
# primary Xcode in use. | |
export DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer/ | |
# Export Archive | |
xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath builds/MyApp.xcarchive -exportPath builds/MyApp.ipa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unzip the ipa file to verify contents | |
cd builds | |
unzip -q MyApp.ipa | |
ls -al | |
# We should see the following folders | |
# - Payload | |
# - SwiftSupport | |
# - Symbols | |
# - WatchKitSupport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd Payload | |
#Verify Watch App | |
xcrun codesign -dv MyApp.app/PlugIns/MyApp\ WatchKit\ Extension.appex/MyApp\ WatchKit\ App.app | |
#Verify Watch Extension | |
xcrun codesign -dv MyApp.app/PlugIns/MyApp\ WatchKit\ Extension.appex | |
#Verify main app | |
xcrun codesign -dv MyApp.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Provisioning profiles from the command line | |
# Credit: http://stackoverflow.com/questions/11128284/provide-xcodebuild-with-mobileprovision-file | |
# | |
# Usage: | |
# ./install_profile.sh /path/to/provisioning_profile | |
# | |
die() { echo "$@" 1>&2 ; exit 1; } | |
if [ ! $# == 1 ]; then | |
echo "Usage: $0 (/path/to/provisioning_profile)" | |
exit | |
fi | |
provisioning_profile=$1 | |
uuid=$(/usr/libexec/PlistBuddy -c 'Print UUID' /dev/stdin <<< $(security cms -D -i $provisioning_profile)) || die "Could not extract profile from $provisioning_profile" | |
echo "Found UUID: $uuid" | |
output=~/Library/MobileDevice/Provisioning\ Profiles/$uuid.mobileprovision | |
echo "copying to $output.." | |
cp "${provisioning_profile}" "$output" || die "failed to copy $provisioning_profile to $output" | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.matrixprojects.net/p/xcodebuild-export-options-plist