Get UUID from .mobileprovision File using Nodejs

640 Views Asked by At

I want to extract UUID from .mobileprovision file but unable to do that.

I tried xml2js, provision and diffrent modules of nodejs to achieve this and I also tried this https://gist.github.com/benvium/2568707 but did not get any success.

1

There are 1 best solutions below

2
robertklep On BEST ANSWER

This works just fine for me:

const provisioning = require('provisioning');

provisioning('XXX.mobileprovision', (err, obj) => {
  if (err) throw err; // TODO: handle better
  console.log(obj.UUID);
});

Uses the provisioning module.