Skip to content

Commit

Permalink
fix schemeTarget for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaDiachenko committed Mar 15, 2024
1 parent 36dd311 commit aff8e93
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/sdk-apple/src/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const runXcodeProject = async (c: Context, runDeviceArguments?: string) =
logDefault('runXcodeProject', `targetArgs:${runDeviceArguments}`);

const appPath = getAppFolder(c);
const schemeTarget = getConfigProp(c, c.platform, 'schemeTarget') || 'RNVApp';
const schemeTarget = getConfigProp(c, c.platform, 'schemeTarget') || _getDefaultSchemeTarget(c.platform!);
const runScheme = getConfigProp(c, c.platform, 'runScheme') || 'Debug';
const bundleIsDev = getConfigProp(c, c.platform, 'bundleIsDev') === true;
const bundleAssets = getConfigProp(c, c.platform, 'bundleAssets') === true;
Expand Down Expand Up @@ -464,7 +464,7 @@ export const buildXcodeProject = async (c: Context) => {

const appFolderName = getAppFolderName(c, platform);
const runScheme = getConfigProp(c, platform, 'runScheme', 'Debug');
const schemeTarget = getConfigProp(c, c.platform, 'schemeTarget') || 'RNVApp';
const schemeTarget = getConfigProp(c, c.platform, 'schemeTarget') || _getDefaultSchemeTarget(c.platform!);

let destinationPlatform = '';
switch (c.platform) {
Expand Down Expand Up @@ -567,7 +567,8 @@ const archiveXcodeProject = (c: Context) => {
const { platform } = c;

const appFolderName = getAppFolderName(c, c.platform);
const schemeTarget = getConfigProp(c, platform, 'schemeTarget', 'RNVApp');
const schemeTarget = getConfigProp(c, platform, 'schemeTarget', _getDefaultSchemeTarget(c.platform!));

const runScheme = getConfigProp(c, platform, 'runScheme', 'Debug');
let sdk = getConfigProp(c, platform, 'sdk');
if (!sdk) {
Expand Down Expand Up @@ -835,3 +836,5 @@ export const configureXcodeProject = async (c: Context) => {
await parseXcodeProject(c);
return true;
};

const _getDefaultSchemeTarget = (platform: string) => (platform === 'ios' ? 'RNVApp' : 'RNVApp-tvOS');

0 comments on commit aff8e93

Please sign in to comment.