10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode7でのipaの作成shメモ

Posted at

ジェンキンスを使用するにあたり、shから
ipaを吐き出す必要があったので自分用メモ

build.sh

PROJ_FILE_DIR="Xcodeのディレクトリパス"
PROJ_FILE_PATH="*.xcodeprojのパス"
INFO_PLIST_PATH="コピーするInfo.plistのパス"
SDK="SDKのバージョン 「xcodebuild -showsdks」で一覧が確認可能 iOS9.0の場合はiphoneos9.0"
TARGET_NAME="ターゲットの名前"
CONFIGURATION="ビルド設定 (Debug, Release など) の指定"
OUT_APP_DIR=".appの出力先" 
PRODUCT_NAME=".appfのファイル名"
OUT_IPA_DIR="ipaの出力先"
IPA_FILE_NAME="ipaのファイル名"


# plistのコピー
cp -f "${INFO_PLIST_PATH}" "${PROJ_FILE_DIR}"

# 念のためのクリーン
# -------------------------
xcodebuild clean -project "${PROJ_FILE_PATH}"

# ビルド
# -------------------------
xcodebuild -project "${PROJ_FILE_PATH}" -sdk "${SDK}" -configuration "${CONFIGURATION}" -target "${TARGET_NAME}" ENABLE_BITCODE="NO" install DSTROOT="${OUT_APP_DIR}"

# ipaの作成
# -------------------------
xcrun -sdk "${SDK}" PackageApplication "${OUT_APP_DIR}/Applications/${PRODUCT_NAME}.app" -o "${OUT_IPA_DIR}/${IPA_FILE_NAME}.ipa"

こんな感じで。
plist.infoはATSの問題を回避するためにあらかじめ編集したファイルをコピー
ENABLE_BITCODEをビルド時に"No"に指定

あとはipaを作成するだけ

以上

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?