diff --git a/.github/workflows/flagship_ci.yml b/.github/workflows/flagship_ci.yml index f2ea81e6..603aecd5 100644 --- a/.github/workflows/flagship_ci.yml +++ b/.github/workflows/flagship_ci.yml @@ -10,11 +10,12 @@ jobs: strategy: matrix: run-config: - - { scheme: 'Flagship', destination: 'platform=iOS Simulator,name=iPhone 17', label: 'iOS'} - - { scheme: 'Flagship-tvOS', destination: 'platform=tvOS Simulator,name=Apple TV', label: 'tvOS' } + # Generic destinations don't depend on a specific simulator being installed on the runner + - { scheme: 'Flagship', destination: 'generic/platform=iOS Simulator', label: 'iOS'} + - { scheme: 'Flagship-tvOS', destination: 'generic/platform=tvOS Simulator', label: 'tvOS' } - { scheme: 'Flagship-macOS', destination: 'platform=macOS', label: 'macOS'} - - { scheme: 'Flagship-watchOS', destination: 'platform=watchOS Simulator,name=Apple Watch Ultra 3 (49mm),OS=26.2', label: 'watchOS'} - + - { scheme: 'Flagship-watchOS', destination: 'generic/platform=watchOS Simulator', label: 'watchOS'} + steps: - name: Checkout Project uses: actions/checkout@v4 @@ -26,8 +27,26 @@ jobs: steps: - name: Checkout Project uses: actions/checkout@v4 + - name: Pick an available iPhone simulator + id: sim + run: | + # Pick the first available iPhone on the newest installed iOS runtime + UDID=$(xcrun simctl list devices available -j | jq -r ' + .devices | to_entries + | map(select(.key | test("SimRuntime\\.iOS-"))) + | sort_by(.key | capture("iOS-(?[0-9-]+)").v | split("-") | map(tonumber)) + | reverse + | map(.value[] | select(.name | startswith("iPhone"))) + | .[0].udid // empty') + if [ -z "$UDID" ]; then + echo "No iPhone simulator available on this runner" + xcrun simctl list devices available + exit 1 + fi + echo "Using simulator: $(xcrun simctl list devices | grep "$UDID")" + echo "udid=$UDID" >> "$GITHUB_OUTPUT" - name: Test SDK Flagship - run: xcodebuild test -project Flagship/Flagship.xcodeproj -scheme "Flagship" -destination "platform=iOS Simulator,name=iPhone 17" -enableCodeCoverage YES + run: xcodebuild test -project Flagship/Flagship.xcodeproj -scheme "Flagship" -destination "platform=iOS Simulator,id=${{ steps.sim.outputs.udid }}" -enableCodeCoverage YES - name: Upload coverage to Codecov uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 with: diff --git a/FlagShip.podspec b/FlagShip.podspec index df6864a7..331e9b35 100644 --- a/FlagShip.podspec +++ b/FlagShip.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "FlagShip" - s.version = "5.0.0" + s.version = "5.0.1" s.summary = "Flagship SDK" # This description is used to generate tags and improve search results. diff --git a/FlagShip/Flagship.xcodeproj/project.pbxproj b/FlagShip/Flagship.xcodeproj/project.pbxproj index 91dac9dd..c3e78b1f 100644 --- a/FlagShip/Flagship.xcodeproj/project.pbxproj +++ b/FlagShip/Flagship.xcodeproj/project.pbxproj @@ -1908,7 +1908,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 5.0.0; + MARKETING_VERSION = 5.0.1; OTHER_LDFLAGS = ""; OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = ABTasty.FlagShip; @@ -1942,7 +1942,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 5.0.0; + MARKETING_VERSION = 5.0.1; OTHER_LDFLAGS = ""; OTHER_SWIFT_FLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = ABTasty.FlagShip; diff --git a/FlagShip/Source/Tools/FlagShipVersion.swift b/FlagShip/Source/Tools/FlagShipVersion.swift index 4e97b457..5a3d5766 100644 --- a/FlagShip/Source/Tools/FlagShipVersion.swift +++ b/FlagShip/Source/Tools/FlagShipVersion.swift @@ -9,4 +9,4 @@ import Foundation /// This file is automatically updated 2.0.0 -public let FlagShipVersion = "5.0.0" +public let FlagShipVersion = "5.0.1"