hero-app-info-parser
v0.1.1
Published
Exact info from apk or ipa file.
Downloads
2
Readme
hero-app-info-parser
[hero-app-info-parser]is a parser for parsing .ipa
or .apk
or .aab
files. It will return the information with json from AndroidManifest.xml
or Info.plist
.
为英雄游戏定制开发的app解析工具,基于app-info-parser 的二次开发,适用场景有限(仅限英雄游戏)!
Support
Node ✅
Browser
| | | | | | | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: | | latest ✅ | latest ✅ | latest ✅ | latest ✅ | ❌ |
Installation
npm install hero-app-info-parser
# or yarn
yarn add hero-app-info-parser
Getting started
NPM Use
const AppInfoParser = require('hero-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 Use
<input type="file" name="file" id="file" onchange="fileSelect()">
<script src="/dist/hero-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
You can use demand loading, when you only need one parser.
ApkParser
const ApkParser = require('hero-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('hero-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)
})
AabParser
const AabParser = require('hero-app-info-parser/src/aab')
const parser = new IpaParser('../packages/test.aab')
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
License
MIT