Skip to content

Commit 98f8ef4

Browse files
list simulators before attempting to list sdks
1 parent e8437a1 commit 98f8ef4

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58609,7 +58609,11 @@ async function GetProjectDetails(credential, xcodeVersion) {
5860958609
core.info(`Platform: ${platform}`);
5861058610
if (platform !== 'macOS') {
5861158611
const platformSdkVersion = await getPlatformSdkVersion(buildSettings);
58612-
await downloadPlatformSdk(platform, platformSdkVersion);
58612+
await execXcRun(['simctl', 'list']);
58613+
const sdkInfo = await getSdkInfo(platform, platformSdkVersion);
58614+
if (!sdkInfo) {
58615+
await downloadPlatformSdk(platform, platformSdkVersion);
58616+
}
5861358617
}
5861458618
const configuration = core.getInput('configuration') || 'Release';
5861558619
core.info(`Configuration: ${configuration}`);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/xcode.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {
1212
log,
1313
matchRegexPattern,
1414
getFirstPathWithGlob,
15-
getFileContents,
16-
getPathsWithGlob
15+
getFileContents
1716
} from './utilities';
1817
import { SemVer } from 'semver';
1918
import core = require('@actions/core');
@@ -161,8 +160,12 @@ export async function GetProjectDetails(credential: AppleCredential, xcodeVersio
161160

162161
if (platform !== 'macOS') {
163162
const platformSdkVersion = await getPlatformSdkVersion(buildSettings);
164-
// await getSdkInfo(platform, platformSdkVersion);
165-
await downloadPlatformSdk(platform, platformSdkVersion);
163+
await execXcRun(['simctl', 'list']);
164+
const sdkInfo = await getSdkInfo(platform, platformSdkVersion);
165+
166+
if (!sdkInfo) {
167+
await downloadPlatformSdk(platform, platformSdkVersion);
168+
}
166169
}
167170

168171
const configuration = core.getInput('configuration') || 'Release';

0 commit comments

Comments
 (0)