2017-05-31 5 views
1

xcodeビルドスクリプトに問題があります。Xcode 8.3.2ビルドスクリプト - 指定されたアプリケーションが存在しないかバンドルディレクトリではありません

古いXcodeでは、このスクリプトはうまくいきましたが、アップグレード後は常にxcodeが失敗しました。

configuration='Release' provision="haithngn_release.mobileprovision" identity="iPhone Distribution: HAITHNGN (TEAMID)"

sdk="iphoneos" 
scheme="Mobile" 
configuration=$1 
version=$2 
build=$3 
output="$PWD/build/$scheme.$version.$build.$configuration.ipa" 

PLIST_PATH="./Mobile/Platforms/ios/Application/" 
PLIST_FILE="Info.plist" 

/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $version" "$PLIST_PATH/$PLIST_FILE" 
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $version.$build" "$PLIST_PATH/$PLIST_FILE" 

echo "Cleaning up old build..." 
rm -Rf "$PWD/build/$configuration-$sdk" 

echo "Building $scheme, using $configuration configuration, provisioning = $provision" 

xcodebuild -sdk "$sdk" -scheme "$scheme" -configuration "$configuration" clean OBJROOT="$PWD/build" SYMROOT="$PWD/build" ONLY_ACTIVE_ARCH=NO 
xcodebuild -sdk "$sdk" -scheme "$scheme" -configuration "$configuration" OBJROOT="$PWD/build" SYMROOT="$PWD/build" ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="$identity" 
xcodebuild -exportArchive -sdk "$sdk" "$PWD/build/$configuration-$sdk/$scheme.app" "$PWD/build/$configuration-$sdk/$scheme.ipa" "$provision" 
cp "$PWD/build/$configuration-$sdk/$scheme.ipa" "$output" 

ターミナルログ:

xcodebuild: error: The flag -exportPath is required when specifying -exportArchive. xcodebuild: error: The flag -exportOptionsPlist is required when specifying -exportArchive. xcodebuild: error: The flag -archivePath is required when specifying -exportArchive.

XCodeのバージョンのXcode 8.3から始まっ8.3.2

答えて

1

、あなただけのApp作品をビュン、代わりにxcrunthereを参照)、または明らかでxcodebuild -exportArchiveを使用する必要があります同様に(thereを参照)。

それ以外の場合は、Fastlane Gymを使用します。

+0

私は "/ $構成 - $ SDK/$ scheme.appを構築/「の$ PWD /構築/ $構成 - $を xcodebuild -exportArchive -sdk "$ SDKの" の" $ PWDを調整している、あなたのアイデアのための をいただき、ありがとうございます xcodebuild:エラー:-exportArchiveを指定するときに-exportPathフラグが必要です。 xcodebuild:エラー:-exportArchiveを指定するときに-exportOptionsPlistフラグが必要です。 xcodebuild:エラー:-exportArchiveを指定するときに-archivePathフラグが必要です。 – haithngn

+0

はい、追加のフラグをいくつか追加する必要があります。これを見てください:http://subathrathanabalan.com/2016/01/07/building-ipa-export-archive/ – filaton

+0

**アーカイブ成功** **エクスポート失敗** エラー= { "" = {​​ " haithngn

関連する問題