Skip to content

Instantly share code, notes, and snippets.

@ochim
Last active July 13, 2018 02:52
Show Gist options
  • Select an option

  • Save ochim/33d2c57b10c7fb49fd93c221671e708a to your computer and use it in GitHub Desktop.

Select an option

Save ochim/33d2c57b10c7fb49fd93c221671e708a to your computer and use it in GitHub Desktop.
[ios]xcodebuildでarchiveしてipa作成
#!/bin/bash
# 作業ディレクトリ作成
mkdir build

# Archive作成
xcodebuild -workspace hogehoge.xcworkspace \
    -scheme hogehoge \
    -configuration Debug \
    clean archive \
    -archivePath ./build/build

# Exportしてipa作成
xcodebuild -exportArchive \
-archivePath ./build/build.xcarchive \
-exportPath ./build \
-exportOptionsPlist exportOptions.plist

# Deploygateにupload
if (( $# >  0   )); then 
   dg deploy ./build/hogehoge.ipa --message "$1"
else
   dg deploy ./build/hogehoge.ipa
fi

exportOptions.plist

<?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>compileBitcode</key>
	<false/>
	<key>method</key>
	<string>development</string>
	<key>signingStyle</key>
	<string>automatic</string>
	<key>stripSwiftSymbols</key>
	<true/>
	<key>teamID</key>
	<string>XXXXXXXX</string>
	<key>thinning</key>
	<string>&lt;none&gt;</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment