matiassingers / ipa-metadata Goto Github PK
View Code? Open in Web Editor NEWextract metadata and provisioning information about an .ipa file
License: MIT License
extract metadata and provisioning information about an .ipa file
License: MIT License
Hello it appears your documentation has one little error in it.
The callback should actually contain two parameters eg. error and data.
ipaMetadata('Facebook.ipa', function(data){
console.log(data);
// { metadata:
// { CFBundleName: 'Facebook',
// ... },
// provisioning:
// { TeamName: 'Facebook Inc.',
// ... } },
// entitlements:
// { application-identifier: '1234abcd.com.facebook.facebook.',
// ... } }
});
Hello me again,
Thanks for the amazingly quick fix on the documentation error, using this project i have found some little inconsistencies which might be handy to address.
Most fieldnames in the returned data object are written in cammelCase. Although some (for example: data.provisioning.Entitlements.application-identifier) contain dashes.
This makes them more difficult to call because you have to use something like:
var x = data.provisioning.Entitlements['application-identifier'];
I don't know if this is a design choice because of the names used in the mobileprovisioning file or not but it might be something you want to to take a look at.
Hi again,
I've been having a quick look at the current codebase with the intent of removing the last dependency on OS X only functionality. As far as I can tell, there is one left and it's in https://github.com/matiassingers/entitlements, which has an exec command to the OS X only command 'codesign'.
I can think of two places to handle the situation that the code is run on another OS, either here in ipa-metadata or in entitlements itself. I'm imaging a simple check like e.g. require('os').platform() === 'darwin' or something along those lines, since the alternative is either doing the call and hoping apple never changes their error codes or depending on a module like which.
The code change would be easiest to do in entitlements (simply returning an empty JSON if the OS isn't OS X), but it might be neater to handle in in ipa-metadata and keep entitlements throwing errors if it can't work. I would strongly prefer avoiding duplicate code in ipa-metadata though (giant if round the async, so sad you can't make parts optional in that) and I'm not really happy with what I've come up with so far to do that. Could I get your opinion on this, please?
Snippet
unzipper.on('extract', function() {
var path = glob.sync(output.path + '/Payload/*/')[0];
data.metadata = plist.readFileSync(path + 'Info.plist');
var callback = function(error, results){
if(error) {
console.log(error);
return cleanUp(error);
}
if(Array.isArray(results)) { //brrr
data.provisioning = results[0];
data.entitlements = results[1];
} else {
data.provisioning = results;
}
delete data.provisioning.DeveloperCertificates;
return cleanUp();
};
if(require('os').platform() === 'darwin') {
async.parallel([
async.apply(provisioning, path + 'embedded.mobileprovision'),
async.apply(entitlements, path)
], callback);
} else {
provisioning(path + 'embedded.mobileprovision', callback);
}
});
Hi @tbrand, I noticed you forked this repo into: https://github.com/tbrand/ipa-metadata2
Would you want to just merge it back to this and I'll add you as a maintainer here?
plz answer
I'm using OS X 10.10.1, with node v0.10.35 and npm 2.1.18, whenever I try to verify or get the verbose output of an IPA file (on command line or within a node app) I get the following error:
element parse error: Error: attribute equal must after attrName
@#[line:3,col:33]
Cannot read property 'nodeName' of null
The IPA is able to be installed on devices (via Ad Hoc distribution) without issue, so I am pretty sure it is valid. Any ideas?
Due tot he fact that this uses the provisioning module which uses the shell command:
security cms -D -i
This is only usable on Mac OS devices. Running it on other operating systems will result in a security not found error. This should at least be noted in the documentation but preferably be changed in a way it is cross platform compatible
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.