Skip to content

Commit

Permalink
remove default build dir overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximBelov committed Feb 16, 2024
1 parent cb44be3 commit f52f3c6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/@ionic/cli/src/lib/integrations/cordova/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { FatalException } from '../../errors';
const debug = Debug('ionic:lib:cordova:project');

const CORDOVA_ANDROID_PACKAGE_PATH = 'platforms/android/app/build/outputs/apk/';
const CORDOVA_IOS_SIMULATOR_PACKAGE_PATH = 'platforms/ios/build/emulator';
const CORDOVA_IOS_DEVICE_PACKAGE_PATH = 'platforms/ios/build/device';
const CORDOVA_IOS_PACKAGE_PATH = 'platforms/ios/build';

export async function getPlatforms(projectDir: string): Promise<string[]> {
const platformsDir = path.resolve(projectDir, 'platforms');
Expand Down Expand Up @@ -74,11 +73,12 @@ export async function getPackagePath(root: string, appName: string, platform: st
if (platform === 'android') {
return getAndroidPackageFilePath(root, { emulator, release });
} else if (platform === 'ios') {
const configuration = release ? 'Release' : 'Debug';
if (emulator) {
return path.join(CORDOVA_IOS_SIMULATOR_PACKAGE_PATH, `${appName}.app`);
return path.join(CORDOVA_IOS_PACKAGE_PATH, `${configuration}-iphonesimulator`, `${appName}.app`);
}

return path.join(CORDOVA_IOS_DEVICE_PACKAGE_PATH, `${appName}.ipa`);
return path.join(CORDOVA_IOS_PACKAGE_PATH, `${configuration}-iphoneos` , `${appName}.ipa`);
}

throw new FatalException(`Unknown package path for ${input(appName)} on ${input(platform)}.`);
Expand Down

0 comments on commit f52f3c6

Please sign in to comment.