File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -243,8 +243,29 @@ jobs:
243243 shell : bash
244244 run : |
245245 yarn add @iterable/react-native-sdk
246- yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
247- echo "${{ env.TURBO_CACHE_DIR }}"
246+
247+ echo "Detecting latest available iOS version..."
248+
249+ # First try to find iOS 18.x that's available
250+ LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS 18" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
251+ # If no iOS 18.x available, fall back to any available iOS version
252+ if [ -z "$LATEST_IOS" ]; then
253+ echo "No iOS 18.x available, falling back to latest available iOS version..."
254+ LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
255+ fi
256+
257+ echo "Using iOS version $LATEST_IOS"
258+
259+ xcodebuild \
260+ -project ReactNativeSdkExample.xcodeproj \
261+ -scheme example \
262+ -sdk iphonesimulator \
263+ -destination "platform=iOS Simulator,OS=$LATEST_IOS,name=iPhone 16 Pro" \
264+ -resultsBundlePath TestResults.xcresult \
265+ test | xcpretty
266+
267+ # yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
268+ # echo "${{ env.TURBO_CACHE_DIR }}"
248269
249270# echo 'If you are using a "manual" build mode for one or more of the' \
250271# 'languages you are analyzing, replace this with the commands to build' \
You can’t perform that action at this time.
0 commit comments