{"action":"created","issue":{"url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/9","labels_url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/9/comments","events_url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/9/events","html_url":"https://github.com/matiassingers/ipa-metadata/issues/9","id":86119308,"number":9,"title":"Last OS X dependancy","user":{"login":"evi-snowm","id":8179340,"avatar_url":"https://avatars.githubusercontent.com/u/8179340?v=3","gravatar_id":"","url":"https://api.github.com/users/evi-snowm","html_url":"https://github.com/evi-snowm","followers_url":"https://api.github.com/users/evi-snowm/followers","following_url":"https://api.github.com/users/evi-snowm/following{/other_user}","gists_url":"https://api.github.com/users/evi-snowm/gists{/gist_id}","starred_url":"https://api.github.com/users/evi-snowm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evi-snowm/subscriptions","organizations_url":"https://api.github.com/users/evi-snowm/orgs","repos_url":"https://api.github.com/users/evi-snowm/repos","events_url":"https://api.github.com/users/evi-snowm/events{/privacy}","received_events_url":"https://api.github.com/users/evi-snowm/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-08T10:26:27Z","updated_at":"2015-06-10T08:54:24Z","closed_at":"2015-06-10T08:45:39Z","body":"Hi again,\r\n\r\nI'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'.\r\n\r\nI 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.\r\n\r\nThe 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?\r\n\r\nSnippet\r\n```javascript\r\nunzipper.on('extract', function() {\r\n    var path = glob.sync(output.path + '/Payload/*/')[0];\r\n    data.metadata = plist.readFileSync(path + 'Info.plist');\r\n    var callback = function(error, results){\r\n      if(error) {\r\n        console.log(error);\r\n        return cleanUp(error);\r\n      }\r\n\r\n      if(Array.isArray(results)) { //brrr\r\n        data.provisioning = results[0];\r\n        data.entitlements = results[1];\r\n      } else {\r\n        data.provisioning = results;\r\n      }\r\n      delete data.provisioning.DeveloperCertificates;\r\n      return cleanUp();\r\n    };\r\n\r\n    if(require('os').platform() === 'darwin') {\r\n      async.parallel([\r\n        async.apply(provisioning, path + 'embedded.mobileprovision'),\r\n        async.apply(entitlements, path)\r\n      ], callback);\r\n    } else {\r\n      provisioning(path + 'embedded.mobileprovision', callback);\r\n    }\r\n  });\r\n```"},"comment":{"url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/comments/110659957","html_url":"https://github.com/matiassingers/ipa-metadata/issues/9#issuecomment-110659957","issue_url":"https://api.github.com/repos/matiassingers/ipa-metadata/issues/9","id":110659957,"user":{"login":"matiassingers","id":938453,"avatar_url":"https://avatars.githubusercontent.com/u/938453?v=3","gravatar_id":"","url":"https://api.github.com/users/matiassingers","html_url":"https://github.com/matiassingers","followers_url":"https://api.github.com/users/matiassingers/followers","following_url":"https://api.github.com/users/matiassingers/following{/other_user}","gists_url":"https://api.github.com/users/matiassingers/gists{/gist_id}","starred_url":"https://api.github.com/users/matiassingers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matiassingers/subscriptions","organizations_url":"https://api.github.com/users/matiassingers/orgs","repos_url":"https://api.github.com/users/matiassingers/repos","events_url":"https://api.github.com/users/matiassingers/events{/privacy}","received_events_url":"https://api.github.com/users/matiassingers/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T08:54:24Z","updated_at":"2015-06-10T08:54:24Z","body":"Published in [`1.4.0`](https://github.com/matiassingers/ipa-metadata/releases/tag/1.4.0)"}}