How do I deploy automated builds to TestFlight from an Xcode Bot? How do I deploy automated builds to TestFlight from an Xcode Bot? xcode xcode

How do I deploy automated builds to TestFlight from an Xcode Bot?


Here is a link to a post that outlines how to create an Xcode bot, connected to a 3rd party git repository, with automated deployment of builds to TestFlight:

http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/

Hope it helps! Please sound off with your comments or feedback.


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 assetsrm -r ${XCS_SOURCE_DIR}/Archivecp -R ${XCS_OUTPUT_DIR}/ ${XCS_SOURCE_DIR}/Archive# Upload to TestFlightIFS=$'\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 BotTestFlight Log




6. Check your build