From 4b479fd050bd6323911e758919322edb0fab31bc Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Tue, 3 Apr 2018 10:07:20 +0300 Subject: [PATCH] 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. --- lib/services/platform-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index fa61489d05..c817cbf714 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -603,7 +603,7 @@ export class PlatformService extends EventEmitter implements IPlatformService { @helpers.hook('cleanApp') public async cleanDestinationApp(platformInfo: IPreparePlatformInfo): Promise { - await this.ensurePlatformInstalled(platformInfo.platform, platformInfo.platformTemplate, platformInfo.projectData, platformInfo.config); + await this.ensurePlatformInstalled(platformInfo.platform, platformInfo.platformTemplate, platformInfo.projectData, platformInfo.config, platformInfo.nativePrepare); const platformData = this.$platformsData.getPlatformData(platformInfo.platform, platformInfo.projectData); const appDestinationDirectoryPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);