Skip to content

Commit 4b479fd

Browse files
fix: Prepare for iOS with cloud builds fails on non macOS
In cloud builds, when we try to prepare the project for iOS, sometimes we fail as the `cleanDestinationApp` does not pass correct arguments to `ensurePlatformInstalled` method. When we have cloud builds, the last argument should declare that the native prepartion should be skipped. When we do not pass it, the logic determines that the platform is not fully added and tries to add it again. The whole `platforms/ios` directory is deleted and then we try preparing the project again. At some point the code fails as there are missing files in the `platforms/ios` (we have deleted them). Pass the correct arguments, so the prepare will skip the native part in the mentioned case.
1 parent 159ca19 commit 4b479fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/services/platform-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
603603

604604
@helpers.hook('cleanApp')
605605
public async cleanDestinationApp(platformInfo: IPreparePlatformInfo): Promise<void> {
606-
await this.ensurePlatformInstalled(platformInfo.platform, platformInfo.platformTemplate, platformInfo.projectData, platformInfo.config);
606+
await this.ensurePlatformInstalled(platformInfo.platform, platformInfo.platformTemplate, platformInfo.projectData, platformInfo.config, platformInfo.nativePrepare);
607607

608608
const platformData = this.$platformsData.getPlatformData(platformInfo.platform, platformInfo.projectData);
609609
const appDestinationDirectoryPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);

0 commit comments

Comments
 (0)