forked from nowsecure/node-applesign
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
32 lines (27 loc) · 787 Bytes
/
example.js
File metadata and controls
32 lines (27 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const Applesign = require('./');
const as = new Applesign({
/* bin/applesign -L to list all available identities in your system */
identity: 'A5A2C300FE2A8EAC99A9601FDAAEA811CC80586F',
/* clone the entitlements from the mobile provisioning */
cloneEntitlements: false,
mobileProvisioning: '/tmp/embedded.mobileprovision'
});
if (process.argv.length < 3) {
console.error('Usage: example.js [path/to/ipa]');
process.exit(1);
}
const s = as.signIPA(process.argv[2], onEnd)
.on('message', (msg) => {
console.log('message', msg);
})
.on('warning', (msg) => {
console.error('warning', msg);
});
function onEnd (error) {
if (error) {
console.log('error', error);
process.exit(1);
} else {
console.log('ios-deploy -b', s.config.outfile);
}
}