Giter Club home page Giter Club logo

ipa-metadata's People

Contributors

matiassingers avatar yujinlim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ipa-metadata's Issues

Only usable on MacOS

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

Errors when attempting to open IPA file

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?

Last OS X dependancy

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);
    }
  });

Documentation incorrect

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.',
  //      ... } }
});

Uniform field names

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.