Skip to main content

Xcode Cloud

Streamline your app's testing process with our guide on pushing your IPA directly from Xcode Cloud to TestApp.io. Enable rapid testing and instant feedback, enhancing your app's development cycle

Updated over 2 months ago

Upload the IPA to TestApp.io from Xcode Cloud

This guide provides steps to upload your iOS application's IPA file to TestApp.io using a post-build script in Xcode Cloud.


​

Prerequisites

Before you begin, ensure you have the following TestApp.io environment variables:

  • TESTAPPIO_APP_ID

  • TESTAPPIO_API_TOKEN

These values can be found in your TestApp.io portal under App -> Integrations -> Releases.

Environment variables for TestApp.io inside Xcode Cloud workflow

TA-CLI Configuration

For detailed information on TA-CLI parameters, refer to the TestApp.io CLI documentation. Adjust the script parameters like --git_release_notes, --git_commit_id, --notify, etc., as required for your setup.


​

Script Setup

Create a directory named ci_scripts at the root of your project.

Inside ci_scripts, create a file named ci_post_xcodebuild.sh.

Copy and paste the following script into ci_post_xcodebuild.sh:

if [ "$CI_PRODUCT_PLATFORM" = "iOS" ]; then
    echo "Uploading to TestApp.io"    # Set the install directory
    export INSTALL_DIR=$(pwd)    # Download and install TestApp.io CLI
    curl -Ls https://github.com/testappio/cli/releases/latest/download/install | bash    # Make the CLI executable
    chmod +x ${INSTALL_DIR}/ta-cli    # Find the .ipa file in the specified directory
    IPA_FILE=$(find "$CI_AD_HOC_SIGNED_APP_PATH" -name "*.ipa" -print -quit)    # Check if an .ipa file was found
    if [ -z "$IPA_FILE" ]; then
        echo "No .ipa file found in $CI_AD_HOC_SIGNED_APP_PATH"
        exit 1
    fi    # Publish using the found .ipa file
    ${INSTALL_DIR}/ta-cli publish --api_token=$TESTAPPIO_API_TOKEN --app_id=$TESTAPPIO_APP_ID --release="ios" --ipa="$IPA_FILE" --git_release_notes=true --git_commit_id=true --archive_latest_release=false --notify=true --source="Xcode Cloud"
fi

Ensure the script is executable by running chmod +x ci_scripts/ci_post_xcodebuild.sh in your project directory.


​

Usage

After setting up the script, it will automatically execute in Xcode Cloud's post-build phase for iOS platform builds, uploading the IPA to TestApp.io.

Xcode Cloud post script

Tip: Once your CI/CD pipeline uploads a build, team members using the TestApp.io mobile app receive a push notification and can install the build with a single tap. You can also create share links to distribute builds to external testers and clients.


Need help? Contact us β€” we're happy to assist!

Did this answer your question?