diff --git a/lib/services/ios-project-service.ts b/lib/services/ios-project-service.ts
index d083538223..5409d353f0 100644
--- a/lib/services/ios-project-service.ts
+++ b/lib/services/ios-project-service.ts
@@ -251,6 +251,22 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
let projectRoot = platformData.projectRoot;
let archivePath = options.archivePath;
let buildOutputPath = path.join(projectRoot, "build", "device");
+ let exportOptionsMethod = await this.getExportOptionsMethod(projectData);
+ let plistTemplate = `
+
+
+
+ method
+ ${exportOptionsMethod}
+ uploadBitcode
+
+
+`;
+
+ // Save the options...
+ temp.track();
+ let exportOptionsPlist = temp.path({ prefix: "export-", suffix: ".plist" });
+ this.$fs.writeFile(exportOptionsPlist, plistTemplate);
// The xcodebuild exportPath expects directory and writes the .ipa at that directory.
let exportPath = path.resolve(options.exportDir || buildOutputPath);
@@ -259,7 +275,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
let args = ["-exportArchive",
"-archivePath", archivePath,
"-exportPath", exportPath,
- "-exportOptionsPlist", platformData.configurationFilePath
+ "-exportOptionsPlist", exportOptionsPlist
];
await this.$childProcess.spawnFromEvent("xcodebuild", args, "exit",
{ stdio: buildConfig.buildOutputStdio || 'inherit', cwd: this.getPlatformData(projectData).projectRoot },
@@ -1331,6 +1347,18 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
this.$logger.warnWithLabel("The CFBundleIdentifier key inside the 'Info.plist' will be overriden by the 'id' inside 'package.json'.");
}
}
+
+ private getExportOptionsMethod(projectData: IProjectData): string {
+ const embeddedMobileProvisionPath = path.join(this.getPlatformData(projectData).deviceBuildOutputPath, `${projectData.projectName}.app`, "embedded.mobileprovision");
+ const provision = mobileprovision.provision.readFromFile(embeddedMobileProvisionPath);
+
+ return {
+ "Development": "development",
+ "AdHoc": "ad-hoc",
+ "Distribution": "app-store",
+ "Enterprise": "enterprise"
+ }[provision.Type];
+ }
}
$injector.register("iOSProjectService", IOSProjectService);
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 172a7e87ac..b834b74b20 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -2872,9 +2872,9 @@
}
},
"ios-mobileprovision-finder": {
- "version": "1.0.9",
- "resolved": "https://registry.npmjs.org/ios-mobileprovision-finder/-/ios-mobileprovision-finder-1.0.9.tgz",
- "integrity": "sha1-Hc80ywKeP+oMhSkmu79K6GTswKc=",
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/ios-mobileprovision-finder/-/ios-mobileprovision-finder-1.0.10.tgz",
+ "integrity": "sha1-UaXn+TzUCwN/fI8+JwXjSI11VgE=",
"requires": {
"chalk": "1.1.3",
"plist": "2.1.0",
diff --git a/package.json b/package.json
index 9b36164ee2..af34c0b271 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
"iconv-lite": "0.4.11",
"inquirer": "0.9.0",
"ios-device-lib": "0.4.8",
- "ios-mobileprovision-finder": "1.0.9",
+ "ios-mobileprovision-finder": "1.0.10",
"ios-sim-portable": "~3.0.0",
"lockfile": "1.0.1",
"lodash": "4.13.1",