Get ipa file name from xcodeproject PRODUCT_NAME

PRODUCT_NAME=$(xcrun xcodebuild -showBuildSettings -scheme "${SCHEME}" -configuration "${CONFIGURATION}" | grep ' PRODUCT_NAME ' | awk '{ print $3 }')

echo "PRODUCT_NAME=${PRODUCT_NAME}"
CONFIGURATION is usually RELEASE or DEBUG SCHEME is the thingy to the left of simulator or device :) Now this PRODUCT_NAME can be used to search the ipa file after xcodebuild finished building:
IPA_FILENAME=$(find "$ARCHIVE_DIR" -type f -name "${PRODUCT_NAME}.ipa")

0 comments :

This work is licensed under BSD Zero Clause License | nacho4d ®