Created
January 4, 2021 08:51
-
-
Save cathandnya/942c79e8129ec418eb8dcd4a17deaa0c to your computer and use it in GitHub Desktop.
make-xcframework.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ $# -ne 3 ]; then | |
if [ $# -ne 2 ]; then | |
echo "usage: make-xcframework PROJECT SCHEME PRODUCT_NAME" | |
else | |
PROJECT=$1 | |
SCHEME=$2 | |
PRODUCT_NAME=$2 | |
fi | |
else | |
PROJECT=$1 | |
SCHEME=$2 | |
PRODUCT_NAME=$3 | |
fi | |
echo "project: ${PROJECT}, scheme: ${SCHEME}" | |
DERIVED_DATA="DerivedData" | |
mkdir -p ${DERIVED_DATA} | |
/usr/bin/xcrun xcodebuild -project ${PROJECT} -scheme ${SCHEME} -configuration Release -derivedDataPath ${DERIVED_DATA} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build VALIDATE_WORKSPACE=NO | |
/usr/bin/xcrun xcodebuild -project ${PROJECT} -scheme ${SCHEME} -configuration Release -derivedDataPath ${DERIVED_DATA} -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build VALIDATE_WORKSPACE=NO | |
xcodebuild -create-xcframework -output ${PRODUCT_NAME}.xcframework -framework ${DERIVED_DATA}/Build/Products/Release-iphoneos/${PRODUCT_NAME}.framework -framework ${DERIVED_DATA}/Build/Products/Release-iphonesimulator/${PRODUCT_NAME}.framework | |
rm -rf ${DERIVED_DATA} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment