Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pecasha/app-info-parser

Repository files navigation

app-info-parser

app-info-parser is a parser for parsing .ipa or .apk files. It will return the information with json from AndroidManifest.xml or Info.plist.

Support

  • npx

Installation

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

Getting started

NPX Use

You can use app-info-parser by npx, if you don't want to install it. Run this command in your terminal:

npx app-info-parser -f <file-path> -o <output-path>
argument type description
-f string The path of file that you want to parse.
-o string The output path that you want to save the parse result. Default is "./result.json"

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

CDN Use

<input type="file" name="file" id="file" onchange="fileSelect()">
<script src="//unpkg.com/browse/app-info-parser/dist/app-info-parser.min.js"></script>
<script>
function fileSelect () {
 const files = document.getElementById('file').files
 const parser = new window.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

You can use demand loading, when you only need one parser.

ApkParser

const ApkParser = require('app-info-parser/src/apk')
const parser = new ApkParser('../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 IpaParser('../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

  • constructor(file)
    • file Blob or File in browser, Path in Node
  • parse: () => Promise<Object> A function return a promise, which resolving the parse result

Buy Me A Coffee

Open source is not easy, you can buy me a coffee. Note your name or github id so I can add you to the donation list.

Wechat Pay

Ali Pay

Donation List

❤️ Thanks these guys for donations. Contact me with email, if you had donated but not on the list.

Donors Amount Time
*明 100円 2023年03月29日 10:16
*明 100円 2021年06月17日 17:29
=*= 6円.66 2021年05月24日 15:12
*学 6円.66 2021年01月08日 15:32
y*n 6円.66 2020年08月26日 12:10
*明 100円 2020年08月25日 11:35
*肖 6円.66 2020年07月31日 19:54
O*s 1円 2020年05月26日 16:01
**豪 6円.66 2020年03月05日 20:14
*大 6円.66 2020年02月25日 16:55
*风 1円 2020年01月03日 15:36
黄灰红 1円 2019年12月10日 17:53
zona.zhou 1円 2019年10月20日 23:18
*。 66円 2019年10月20日 22:45

License

MIT

Resources

FAQ

Build/Parse error with vite?

See this issue of vite, vite is not going support node global builtins and node specific api's on the client. Some of app-info-parser's deps didn't support browser env, most of them without maintain, so it can't be resolved.

Just use app-info-parser by CDN using(import by script element), don't use it with module import in vite.

About

A javascript parser for parsing .ipa or .apk files. IPA/APK文件 js 解析器

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

  • JavaScript 93.7%
  • HTML 6.3%

AltStyle によって変換されたページ (->オリジナル) /