Skip to content

Instantly share code, notes, and snippets.

@yuiseki
Created February 25, 2015 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuiseki/b581a005310467c6df0d to your computer and use it in GitHub Desktop.
Save yuiseki/b581a005310467c6df0d to your computer and use it in GitHub Desktop.
XCodeでipaの出力がうまく行かない時に、最新っぽいarchivesからipaを無理やり生成するスクリプト
ipa_base="debug"
ipa_ext=".ipa"
profile="iOSTeam Provisioning Profile: *"
archives="/Users/$USER/Library/Developer/Xcode/Archives/"
newest_dir=`ls -lt $archives|head -n 2|tail -n 1|cut -f 13- -d " "`
echo $newest_dir
newest_ipa=`ls -lt $archives$newest_dir|head -n 2|tail -n 1|cut -f 13- -d " "`
echo $newest_ipa
filename=${ipa_base}_${newest_dir//-/_}${ipa_ext}
echo $filename
xcodebuild -exportArchive -archivePath "$archives$newest_dir/$newest_ipa"\
-exportProvisioningProfile "$profile" -exportPath ./$filename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment