Skip to content

Commit d6adcf9

Browse files
author
Wang Jiangtao
committed
Support library add command with iOS 7
1 parent 97e4eff commit d6adcf9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/services/ios-project-service.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,9 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
194194
shell.cp("-R", libraryPath, fullTargetPath);
195195

196196
let project = this.createPbxProj();
197-
let frameworkPath = this.getFrameworkRelativePath(libraryPath);
198-
project.addFramework(frameworkPath, { customFramework: true, embed: true });
199-
project.updateBuildProperty("IPHONEOS_DEPLOYMENT_TARGET", "8.0");
197+
let frameworkPath = "$(PROJECT_DIR)/" + this.getFrameworkRelativePath(libraryPath);
198+
project.addFramework(frameworkPath, { customFramework: true, embed: true, weak: true });
200199
this.savePbxProj(project).wait();
201-
this.$logger.info("The iOS Deployment Target is now 8.0 in order to support Cocoa Touch Frameworks.");
202200
}).future<void>()();
203201
}
204202

@@ -313,7 +311,7 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
313311

314312
_.each(this.getAllDynamicFrameworksForPlugin(pluginData).wait(), fileName => {
315313
let fullFrameworkPath = path.join(pluginPlatformsFolderPath, fileName);
316-
let relativeFrameworkPath = this.getFrameworkRelativePath(fullFrameworkPath);
314+
let relativeFrameworkPath = "$(PROJECT_DIR)/" + this.getFrameworkRelativePath(fullFrameworkPath);
317315
project.removeFramework(relativeFrameworkPath, { customFramework: true, embed: true })
318316
});
319317

@@ -379,4 +377,4 @@ class IOSProjectService extends projectServiceBaseLib.PlatformProjectServiceBase
379377
}).future<void>()();
380378
}
381379
}
382-
$injector.register("iOSProjectService", IOSProjectService);
380+
$injector.register("iOSProjectService", IOSProjectService);

0 commit comments

Comments
 (0)