Xcode 12
Use xcodebuild command-line tool
1. Create a Distribution Certificate
2. Create a Distribution Profile
3. Add "Post-Integration Script"
[Test Flight] Script
# Remove & Copy assets
rm -r ${XCS_SOURCE_DIR}/Archive
cp -R ${XCS_OUTPUT_DIR}/ ${XCS_SOURCE_DIR}/Archive
# Upload to TestFlight
IFS=$'\n'
ARCHIVE_PATH=$(find ${XCS_SOURCE_DIR}${PRODUCT_NAME} -name "BeBe.xcarchive")
IFS=$' '
IFS=$'\n'
PLIST_PATH=$(find ${XCS_SOURCE_DIR}${PRODUCT_NAME} -name "exportOptions.plist")
IFS=$' '
xcodebuild -exportArchive -archivePath $ARCHIVE_PATH -exportOptionsPlist $PLIST_PATH -exportPath $ARCHIVE_PATH
4. Add your "exportOption.plist" file in your project folder.
To export an ipa file, you need the"exportOption.plist" file.
exportOption.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>method</key>
<string>app-store</string>
<key>destination</key>
<string>upload</string>
</dict>
</plist>
5. Run your Bot
6. Check your build