Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix schemeTarget for ios #1470

Merged
merged 2 commits into from Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions packages/sdk-apple/src/runner.ts
Expand Up @@ -217,7 +217,7 @@ export const runXcodeProject = async (runDeviceArguments?: string) => {
logDefault('runXcodeProject', `targetArgs:${runDeviceArguments}`);

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

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

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

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

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

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