Skip to content

Change xCode version #117

Change xCode version

Change xCode version #117

name: CI - Tests
on:
push:
branches-ignore:
- 'master'
- 'releases/**'
workflow_call:
jobs:
Tests:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.4'
- name: create Podfile
run: bash .github/bash_scripts/podfile_creation.sh
- name: CocoaPod Install
run: pod install
- name: Detect Available iOS Simulator
id: detect-simulator
run: |
echo "Listing available iOS Simulators..."
xcrun simctl list devices available iOS
# Find the first available and booted/bootable iPhone simulator
SIMULATOR_ID=$(xcrun simctl list devices available iOS | grep -m 1 "iPhone" | grep -oE '\([A-Z0-9-]+\)' | tr -d '()')
if [ -n "$SIMULATOR_ID" ]; then
echo "Using simulator ID: $SIMULATOR_ID"
echo "destination=platform=iOS Simulator,id=$SIMULATOR_ID" >> $GITHUB_OUTPUT
else
# Fallback to generic iOS Simulator (uses default for the Xcode version)
echo "No specific iPhone found, using generic iOS Simulator"
echo "destination=generic/platform=iOS Simulator" >> $GITHUB_OUTPUT
fi
- name: Test
run: xcodebuild test -scheme segment-appsflyer-ios -workspace segment-appsflyer-ios.xcworkspace -destination '${{ steps.detect-simulator.outputs.destination }}' | xcpretty && exit ${PIPESTATUS[0]}