Skip to content

Commit 0a05e6e

Browse files
Fatme HavaluovaFatme Havaluova
Fatme Havaluova
authored and
Fatme Havaluova
committed
Fix PR comments
1 parent 69a5c05 commit 0a05e6e

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/definitions/project.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ interface IPlatformProjectService {
4242
isPlatformPrepared(projectRoot: string): IFuture<boolean>;
4343
addLibrary(libraryPath: string): IFuture<void>;
4444
canUpdatePlatform(currentVersion: string, newVersion: string): IFuture<boolean>;
45+
/**
46+
* Provides a platform specific update logic for the specified runtime versions.
47+
* @return true in cases when the update procedure should continue.
48+
*/
4549
updatePlatform(currentVersion: string, newVersion: string, canUpdate: boolean): IFuture<boolean>;
4650
preparePluginNativeCode(pluginData: IPluginData, options?: any): IFuture<void>;
4751
removePluginNativeCode(pluginData: IPluginData): IFuture<void>;

lib/services/ios-project-service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,17 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
247247
let isUpdateConfirmed = this.$prompter.confirm(`We need to override xcodeproj file. The old one will be saved at ${this.$options.profileDir}. Are you sure?`, () => true).wait();
248248
if(isUpdateConfirmed) {
249249
// Copy old file to options["profile-dir"]
250-
let sourceFile = path.join(this.platformData.projectRoot, util.format("%s.xcodeproj", this.$projectData.projectName));
250+
let sourceFile = path.join(this.platformData.projectRoot, `${this.$projectData.projectName}.xcodeproj`);
251251
let destinationFile = path.join(this.$options.profileDir, "xcodeproj");
252252
this.$fs.deleteDirectory(destinationFile).wait();
253253
shell.cp("-R", path.join(sourceFile, "*"), destinationFile);
254-
this.$logger.info("Backup file %s at location %s", sourceFile, destinationFile);
255-
this.$fs.deleteDirectory(path.join(this.platformData.projectRoot, util.format("%s.xcodeproj", this.$projectData.projectName))).wait();
254+
this.$logger.info(`Backup file ${sourceFile} at location ${destinationFile}`);
255+
this.$fs.deleteDirectory(sourceFile).wait();
256256

257257
// Copy xcodeProject file
258258
let cachedPackagePath = path.join(this.$npmInstallationManager.getCachedPackagePath(this.platformData.frameworkPackageName, newVersion), constants.PROJECT_FRAMEWORK_FOLDER_NAME, util.format("%s.xcodeproj", IOSProjectService.IOS_PROJECT_NAME_PLACEHOLDER));
259-
shell.cp("-R", path.join(cachedPackagePath, "*"), path.join(this.platformData.projectRoot, util.format("%s.xcodeproj", this.$projectData.projectName)));
260-
this.$logger.info("Copied from %s at %s.", cachedPackagePath, this.platformData.projectRoot);
259+
shell.cp("-R", path.join(cachedPackagePath, "*"), sourceFile);
260+
this.$logger.info(`Copied from ${cachedPackagePath} at ${this.platformData.projectRoot}.`);
261261

262262
let pbxprojFilePath = path.join(this.platformData.projectRoot, this.$projectData.projectName + IOSProjectService.XCODE_PROJECT_EXT_NAME, "project.pbxproj");
263263
this.replaceFileContent(pbxprojFilePath).wait();

0 commit comments

Comments
 (0)