|
2 | 2 |
|
3 | 3 | const tools = require('./lib/tools');
|
4 | 4 | const config = require('./lib/config');
|
| 5 | +const idprov = require('./lib/idprov'); |
5 | 6 | const EventEmitter = require('events').EventEmitter;
|
6 | 7 | const path = require('path');
|
7 | 8 | const { execSync } = require('child_process');
|
@@ -123,11 +124,12 @@ class Applesign {
|
123 | 124 | async _pullMobileProvision () {
|
124 | 125 | if (this.config.deviceProvision === true) {
|
125 | 126 | this.config.mobileprovision = await this.getDeviceProvision();
|
126 |
| - } else { |
127 |
| - this.config.mobileprovision = this.config.mobileprovisions[0]; |
128 |
| - if (this.config.mobileprovisions.length > 1) { |
129 |
| - this.config.mobileprovisions.slice(1); |
130 |
| - } |
| 127 | + this.config.mobileprovisions = [this.config.mobileprovision]; |
| 128 | + this.config.identity = idprov(this.config.mobileprovision); |
| 129 | + } |
| 130 | + this.config.mobileprovision = this.config.mobileprovisions[0]; |
| 131 | + if (this.config.mobileprovisions.length > 1) { |
| 132 | + this.config.mobileprovisions.slice(1); |
131 | 133 | }
|
132 | 134 | }
|
133 | 135 |
|
@@ -453,8 +455,8 @@ class Applesign {
|
453 | 455 | let newEntitlements = (appId && teamId && this.config.entry)
|
454 | 456 | ? defaultEntitlements(appId, teamId)
|
455 | 457 | : (this.config.entitlement)
|
456 |
| - ? fs.readFileSync(this.config.entitlement).toString() |
457 |
| - : plistBuild(entMacho).toString(); |
| 458 | + ? fs.readFileSync(this.config.entitlement).toString() |
| 459 | + : plistBuild(entMacho).toString(); |
458 | 460 | const ent = plist.parse(newEntitlements.trim());
|
459 | 461 | const shouldRenameGroups = !this.config.mobileprovision && !this.config.cloneEntitlements;
|
460 | 462 | if (shouldRenameGroups && ent['com.apple.security.application-groups']) {
|
|
0 commit comments