@@ -57910,10 +57910,11 @@ async function RemoveCredentials() {
5791057910Object.defineProperty(exports, "__esModule", ({ value: true }));
5791157911exports.XcodeProject = void 0;
5791257912class XcodeProject {
57913- constructor(projectPath, projectName, platform, bundleId, projectDirectory, versionString, bundleVersion, scheme, credential, xcodeVersion) {
57913+ constructor(projectPath, projectName, platform, destination, bundleId, projectDirectory, versionString, bundleVersion, scheme, credential, xcodeVersion) {
5791457914 this.projectPath = projectPath;
5791557915 this.projectName = projectName;
5791657916 this.platform = platform;
57917+ this.destination = destination;
5791757918 this.bundleId = bundleId;
5791857919 this.projectDirectory = projectDirectory;
5791957920 this.versionString = versionString;
@@ -58040,7 +58041,9 @@ async function GetProjectDetails(credential, xcodeVersion) {
5804058041 if (!bundleId) {
5804158042 throw new Error('Unable to determine the bundle ID');
5804258043 }
58043- await getPlatformSdkVersion(projectPath, scheme, platform);
58044+ const destination = core.getInput('destination') || `generic/platform=${platform}`;
58045+ core.debug(`Using destination: ${destination}`);
58046+ await getPlatformSdkVersion(projectPath, scheme, platform, destination);
5804458047 let infoPlistPath = `${projectDirectory}/${projectName}/Info.plist`;
5804558048 if (!fs.existsSync(infoPlistPath)) {
5804658049 infoPlistPath = `${projectDirectory}/Info.plist`;
@@ -58059,7 +58062,7 @@ async function GetProjectDetails(credential, xcodeVersion) {
5805958062 core.info(`CFBundleShortVersionString: ${cFBundleShortVersionString}`);
5806058063 const cFBundleVersion = infoPlist['CFBundleVersion'];
5806158064 core.info(`CFBundleVersion: ${cFBundleVersion}`);
58062- const projectRef = new XcodeProject_1.XcodeProject(projectPath, projectName, platform, bundleId, projectDirectory, cFBundleShortVersionString, cFBundleVersion, scheme, credential, xcodeVersion);
58065+ const projectRef = new XcodeProject_1.XcodeProject(projectPath, projectName, platform, destination, bundleId, projectDirectory, cFBundleShortVersionString, cFBundleVersion, scheme, credential, xcodeVersion);
5806358066 await getExportOptions(projectRef);
5806458067 if (projectRef.isAppStoreUpload() && core.getInput('auto-increment-build-number') === 'true') {
5806558068 projectRef.credential.appleId = await getAppId(projectRef);
@@ -58110,13 +58113,14 @@ async function parseBuildSettings(projectPath) {
5811058113 }
5811158114 return [platformMap[platform], bundleId];
5811258115}
58113- async function getPlatformSdkVersion(projectPath, scheme, platform) {
58116+ async function getPlatformSdkVersion(projectPath, scheme, platform, destination) {
58117+ await (0, exec_1.exec)(xcodebuild, ['-downloadPlatform', platform]);
5811458118 let buildSettingsOutput = '';
5811558119 const projectSettingsArgs = [
5811658120 'build',
5811758121 '-project', projectPath,
5811858122 '-scheme', scheme,
58119- '-destination', `generic/platform=${platform}` ,
58123+ '-destination', destination ,
5812058124 '-showBuildSettings'
5812158125 ];
5812258126 if (!core.isDebug()) {
@@ -58190,16 +58194,11 @@ async function downloadPlatformSdkIfMissing(platform, version) {
5819058194 if (version) {
5819158195 await (0, exec_1.exec)('xcodes', ['runtimes', 'install', `${platform} ${version}`]);
5819258196 }
58193- else {
58194- await (0, exec_1.exec)(xcodebuild, ['-downloadPlatform', platform]);
58195- }
5819658197}
5819758198async function ArchiveXcodeProject(projectRef) {
5819858199 const { projectPath, projectName, projectDirectory } = projectRef;
5819958200 const archivePath = `${projectDirectory}/${projectName}.xcarchive`;
5820058201 core.debug(`Archive path: ${archivePath}`);
58201- let destination = core.getInput('destination') || `generic/platform=${projectRef.platform}`;
58202- core.debug(`Using destination: ${destination}`);
5820358202 const configuration = core.getInput('configuration') || 'Release';
5820458203 core.debug(`Configuration: ${configuration}`);
5820558204 let entitlementsPath = core.getInput('entitlements-plist');
@@ -58213,7 +58212,7 @@ async function ArchiveXcodeProject(projectRef) {
5821358212 'archive',
5821458213 '-project', projectPath,
5821558214 '-scheme', projectRef.scheme,
58216- '-destination', destination,
58215+ '-destination', projectRef. destination,
5821758216 '-configuration', configuration,
5821858217 '-archivePath', archivePath,
5821958218 `-authenticationKeyID`, projectRef.credential.appStoreConnectKeyId,
0 commit comments