setup-xcode icon indicating copy to clipboard operation
setup-xcode copied to clipboard

iOS 18.2 doesn't get installed

Open Tobi696 opened this issue 10 months ago • 16 comments

I use this step with the following configuration in my workflow: Screenshot 2025-01-09 at 10 23 49

It worked until iOS 16.2 became available, now I get this error: Screenshot 2025-01-09 at 10 24 29

Tobi696 avatar Jan 09 '25 09:01 Tobi696

Same. Installing it manually does work but that sucks.

lthoedt avatar Jan 09 '25 10:01 lthoedt

@lthoedt How do you install manually?

Tobi696 avatar Jan 09 '25 10:01 Tobi696

@lthoedt How do you install manually?

xcodebuild -downloadPlatform iOS -buildVersion 18.2 -exportPath ~/SimulatorRuntimes/
xcodebuild -importPlatform "/Users/runner/SimulatorRuntimes/iphonesimulator_18.2_22C150.dmg"

This works but is quite fragile. You could improve this by extracting the path from the output of the first command. This is like 8Gb so that sucks to download each time, cache only allows a total of 10Gb so that would leave only 2Gb for other caches.

lthoedt avatar Jan 09 '25 10:01 lthoedt

+1 Bumping this. Getting the same error as well. I've temporarily reverted to using Xcode 16.1 as a workaround.

aksh1t avatar Jan 14 '25 04:01 aksh1t

Updating Actions runner to macos-15 solved it for me.

shivankacker avatar Jan 15 '25 15:01 shivankacker

Hello. Do we have any updates on this issue? Thanks

laurentcabondm avatar Jan 20 '25 14:01 laurentcabondm

@lthoedt How do you install manually?

xcodebuild -downloadPlatform iOS -buildVersion 18.2 -exportPath ~/SimulatorRuntimes/
xcodebuild -importPlatform "/Users/runner/SimulatorRuntimes/iphonesimulator_18.2_22C150.dmg"

This works but is quite fragile. You could improve this by extracting the path from the output of the first command. This is like 8Gb so that sucks to download each time, cache only allows a total of 10Gb so that would leave only 2Gb for other caches.

Same problem here, only this approach worked for me.

     - name: Manually download iOS 18.2
       if: env.simulator_cached == 'false'
       run: |
         xcodebuild -downloadPlatform iOS -buildVersion 18.2 -exportPath ~/SimulatorRuntimes/
         xcodebuild -importPlatform "/Users/runner/SimulatorRuntimes/iphonesimulator_18.2_22C150.dmg"

GuilhE avatar Feb 27 '25 17:02 GuilhE

I see this as a GitHub Runner issue. 'macos-15-arm64' has an iOS 18.2 simulator installed, while `macos-14-arm64' does not.

justSmK avatar Feb 27 '25 20:02 justSmK

It appears, setting macos-15 is not 100% resolving the issue, still just randomly got the same issue 🤔

dejanskledar avatar Mar 03 '25 07:03 dejanskledar

Hello, wanted to follow up regarding any updates on this? I am facing the same issue, and was wondering if i can get some help regarding how to fix it.

My workflow file -

name: Daily iOS

on:
  schedule:
    - cron: "30 5 * * 1,3,5" # every Monday, Wednesday, Friday at 5:30 AM
  workflow_dispatch:

jobs:
  ios:
    runs-on: macos-15
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      
      - name: Setup Xcode
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: '16.2.0'

      - name: Check Xcode version
        run: /usr/bin/xcodebuild -version

      - name: Setup Flutter
        uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.27.2"
          channel: "stable"
          cache: true

      - name: Get flutter dependencies
        run: flutter pub get

      - name: Install CocoaPods dependencies
        run: |
          pushd ios && pod install --repo-update && popd

      - name: Build Flutter iOS app
        run: |
          flutter build ipa --release -t lib/main_staging.dart --flavor stag --no-codesign

akshatjain-beam avatar Mar 06 '25 06:03 akshatjain-beam

@akshatjain-beam As a temporary solution, using Xcode version 16.1 works for me.

Just set xcode-version: '16.1' in your case.

Kjuly avatar Mar 06 '25 14:03 Kjuly

@akshatjain-beam As a temporary solution, using Xcode version 16.1 works for me.

Just set xcode-version: '16.1' in your case.

Thank you @Kjuly . Tried with using 16.1 and it worked.

FYI - had to update the runs-on to macos-latest instead of macos-15, and it worked and passed the CI

akshatjain-beam avatar Mar 07 '25 01:03 akshatjain-beam

This is happening consistently for me on both macos-14 and macos-15 with variations of xcode 16.2 and xcode 16.1.

I always get this error:

xcodebuild: error: Unable to find a device matching the provided destination specifier:
		{ platform:iOS Simulator, OS:latest, name:iPhone 15 }
	The requested device could not be found because no available devices matched the request.

mhamann avatar Apr 04 '25 04:04 mhamann

@akshatjain-beam As a temporary solution, using Xcode version 16.1 works for me. Just set xcode-version: '16.1' in your case.

Thank you @Kjuly . Tried with using 16.1 and it worked.

FYI - had to update the runs-on to macos-latest instead of macos-15, and it worked and passed the CI

Have you tried with Xcode 16.3.0? I'm using macos-latest with name: Manually download iOS 18.2. Haven't tried updating to 18.4

GuilhE avatar Apr 04 '25 08:04 GuilhE

Thank you @GuilhE

used ios 17.5, and real device ios 18.0, and it worked.

akshatjain-beam avatar Apr 07 '25 00:04 akshatjain-beam

hi there,

i am using macos-15 with xcode-version: 16.3.0

just verified what Simulator/iOS version i am using rn either of options has OS as 16.2

{ platform:iOS Simulator, arch:arm64, id:F61C610B-6BEA-41DF-9ADC-E62AD10537E1, OS:18.2, name:iPhone 16 Pro }
{ platform:iOS Simulator, arch:x86_64, id:F61C610B-6BEA-41DF-9ADC-E62AD10537E1, OS:18.2, name:iPhone 16 Pro }

the complete github-actions logs to select the first available simulator looks like:

Image

also specifying the -destination flag in the Makefile to run test-ci make target:

set -o pipefail && xcodebuild test -scheme UnitTests -destination "platform=iOS Simulator,OS=18.2,name=iPhone 16 Pro" | xcbeautify

nikitakh-sure avatar May 07 '25 21:05 nikitakh-sure

FYI this will also need to be installed manually on macos-15 now, see:

  • https://github.com/actions/runner-images/issues/12541

"Platform tools (SDK and simulator runtimes) will only be available for the three most recently installed versions of Xcode, including beta and pre-release versions for macOS-15-based and later images."

These are the only ones included in the runners by default: https://github.com/actions/runner-images/pull/12711/files

janbrasna avatar Aug 25 '25 16:08 janbrasna