JSPM

  • Created
  • Published
  • Downloads 7619
  • Score
    100M100P100Q123835F
  • License MIT

Exact info from apk or ipa file.

Package Exports

  • app-info-parser

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (app-info-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

app-info-parser

app-info-parser is writed for extracting information from APK and IPA file, which allows you to read the AndroidManifest.xml file in .apk file or Info.plist in .ipa file.

Support

  • Node
  • Browser

Installation

npm install app-info-parser
# or yarn
yarn add app-info-parser

Getting started

NPM Use

const AppInfoParser = require('app-info-parser')
const parser = new AppInfoParser('../packages/test.apk') // or xxx.ipa
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

Basic usage

<input type="file" name="file" id="file" onchange="fileSelect()">
<script src="/dist/app-info-parser.js"></script>
<script>
function fileSelect () {
  const files = document.getElementById('file').files
  const parser = new AppInfoParser(files[0])
  parser.parse().then(result => {
    console.log('app info ----> ', result)
    console.log('icon base64 ----> ', result.icon)
  }).catch(err => {
    console.log('err ----> ', err)
  })
}
</script>

Demand loading

If you only need one Parser, look here.

ApkParser

const ApkParser = require('app-info-parser/src/apk')
const parser = new AppInfoParser('../packages/test.apk')
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

IpaParser

const IpaParser = require('app-info-parser/src/ipa')
const parser = new AppInfoParser('../packages/test.ipa')
parser.parse().then(result => {
  console.log('app info ----> ', result)
  console.log('icon base64 ----> ', result.icon)
}).catch(err => {
  console.log('err ----> ', err)
})

API Referrer

AppInfoParser | ApkParser | IpaParser