Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export async function getBuildSettings(
return null;
}

let selectedTarget = applicationTargets[0];
// Select target matching with the Scheme name first
let selectedTarget =
applicationTargets.find(
(t: string) => t.toLowerCase() === scheme.toLowerCase(),
) || applicationTargets[0];

if (target) {
if (!applicationTargets.includes(target)) {
Expand All @@ -59,8 +63,7 @@ export async function getBuildSettings(
}
}

const targetIndex = applicationTargets.indexOf(selectedTarget);
return settings[targetIndex].buildSettings;
return settings.find((s: any) => s.target === selectedTarget).buildSettings;
}

function getPlatformName(buildOutput: string) {
Expand Down
Loading