# app-metadata

> This library provides functionality to extract IPA, APK and UWP packages.

Latest version **0.1.26** (published 2018-01-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install app-metadata
pnpm add app-metadata
yarn add app-metadata
bun add app-metadata
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.26 |
| Published | 2018-01-24 |
| First published | 2017-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 16 |
| Known vulnerabilities | 0 (+7 in 5 direct dependencies) |
| Install scripts | no |
| GitHub stars | 41 |
| Maintainers | appcenter, bokang, izikl, pniko |

## Links

- npm: https://www.npmjs.com/package/app-metadata
- Repository: https://github.com/Microsoft/app-metadata
- Homepage: https://github.com/Microsoft/app-metadata#readme
- Issues: https://github.com/Microsoft/app-metadata/issues
- npm.io page: https://npm.io/package/app-metadata

## Dependencies (16)

- [tmp](https://npm.io/package/tmp.md) 0.0.31
- [path](https://npm.io/package/path.md) ^0.12.7
- [util](https://npm.io/package/util.md) ^0.10.3
- [uuid](https://npm.io/package/uuid.md) ^3.1.0
- [yauzl](https://npm.io/package/yauzl.md) ^2.9.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.1
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.17
- [winston](https://npm.io/package/winston.md) ^2.3.1
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^5.0.0
- [md5-file](https://npm.io/package/md5-file.md) ^3.1.1
- [extract-zip](https://npm.io/package/extract-zip.md) ^1.6.5
- [simple-plist](https://npm.io/package/simple-plist.md) ^0.2.1
- [decompress-zip](https://npm.io/package/decompress-zip.md) ^0.3.0
- [node-apk-parser](https://npm.io/package/node-apk-parser.md) ^0.2.3

## Recent versions

- 0.1.26 (latest) — 2018-01-24
- 0.1.25 — 2018-01-23
- 0.1.24 — 2018-01-21
- 0.1.23 — 2018-01-11
- 0.1.22 — 2018-01-11
- 0.1.21 — 2018-01-10
- 0.1.20 — 2018-01-09
- 0.1.19 — 2018-01-08
- 0.1.18 — 2018-01-05
- 0.1.17 — 2017-12-29
- 0.1.16 — 2017-12-29
- 0.1.2 — 2017-12-15
- 0.1.1 — 2017-09-14
- 0.1.0 — 2017-09-14
- 0.0.2 — 2017-09-08
- … 1 more at https://npm.io/package/app-metadata/versions

## README

![](https://msmobilecenter.visualstudio.com/_apis/public/build/definitions/454a20a9-dfe6-4c1f-8ae8-417f76adb472/2712/badge)

# Description

This library helps you retrieve the most frequently extracted metadata and icons within iOS, Android and UWP applications.

## Usage 


#### import
```
import { Extract } from 'app-metadata';
```
 
#### usage
```
let results = await Extract.run(pathName);
```
> This library relies on the standard set of file extensions to determine the type of package it is analyzing.

## Results 
The library will return the information most relevant for the supported platforms. For a better understanding of the details retrieved refer to the tables below.

### iOS
```
Supported extension: .ipa
```
| Property        | Description           |
| ------------- |:--------------|
| icon      |  |
| iconName      |       |
| languages | Array of language strings compiled from .lproj files      |
| hasProvisioning | Should always be true since IPA will contain a provisioning profile      |
| appex_provisioning_profiles | Array of all other provisioning profiles included in the metadata      |

- ##### from Plist (info.plist):

| Property        | Description           |
| ------------- |:--------------|
| displayName |CFBundleDisplayName (The user-visible name of the bundle) or CFBundleName (short bundle name)  |
| uniqueIdentifier      |CFBundleIdentifier (reverse DNS that identifies a project by concatenating the company identifier with the product name)       |
| version | CFBundleShortVersionString (The release-version-number string for the bundle)|
| buildVersion | CFBundleVersion (The build-version-number string for the bundle) |
| executableName | CFBundleExecutable (Name of the bundle’s executable file) |
| minimumOsVersion | MinimumOSVersion or LSMinimumSystemVersion |
| deviceFamily | UIdeviceFamily  |

- ##### from Provisioning Profile (embedded.mobileprovision):

| Property        | Description           |
| ------------- |:--------------|
| pathName      | Path of the provisioning profile from inside of the IPA  |
| mobileProvisionFileContent      |Provisioning profile content       |
| teamIdentifier      |Entitlements["com.apple.developer.team-identifier"]  |
| profileType      | If data.ProvisionedDevices exists, "adhoc". Otherwise "enterprise"       |
| expiredAt      | expired_at or ExpirationDate  |
| idName      | AppIDName       |
| name      | Name |
| UniqueDeviceIdentifierList      |  ProvisionedDevices      |
| deviceFamily      | Platform |


### Android
```
Supported extension: .apk
```

- ##### from Manifest:

| Property        | Description           |
| ------------- |:--------------|
| icon      |  |
| iconName      |       |
| uniqueIdentifier      |package   |
| version      | versionName       |
| buildVersion      |versionCode  |
| minimumOsVersion      | usesSdk.minSdkVersion      |
| deviceFamily      | "android"  |

### UWP 
```
Supported extensions: .appx, appxupload or .zip
```

##### from Manifest:

| Property        | Description           |
| ------------- |:--------------|
| deviceFamily      |Constants.WINDOWS  |
| displayName      | Package.Properties.DisplayName      |
| iconFullPath      | Package.Properties.Logo |
| uniqueIdentifier      | Package.Identity.Name       |
| buildVersion      |Package.Identity.Version  |
| minimumOsVersion      |Package.Prerequisites.OSMinVersion or Package.Dependencies.TargetDeviceFamily.MinVersion       |
| executableName      |Package.Applications.Application.Executable   |
| languages      | Built from Package.Resources.Resource.Language       |


### UWP Bundles
```
Supported extensions: .appxbundle, appxupload or .zip
```

> For .appxbundle app packages, the manifest is checked for the correct name of the appx subpackage. If it is found, the metadata is parsed directly from there, otherwise we scavenge for as much as we can get from the appxbundle manifest and metadata

| Property        | Description           |
| ------------- |:--------------|
| icon      |  |
| iconName      |       |
| languages      |Built from .appx language files. Example- VLC_WinRT.WindowsPhone_1.8.4.0_language-en.appx  |

##### from Manifest:

| Property        | Description           |
| ------------- |:--------------|
| deviceFamily      |windows  |
| uniqueIdentifier      |Bundle.Identity.Name       |
| buildVersion      |Bundle.Identity.Version  |
| minimumOsVersion      | Bundle.Prerequisites.OSMinVersion or Bundle.Dependencies.TargetDeviceFamily      |

The assumption for zip and appxUpload is that the unziped folders will have the appx or appxbundle which we will then process as we do normally

## Prerequisites ##

- Install [node](https://nodejs.org/) version [7.6.0](https://nodejs.org/dist/v0.12.7/x64/)

- Install project dependencies (based on `<REPO ROOT>/package.json`)
	```
    npm install
	```
- Install [typescript](http://www.typescriptlang.org/) via [npm](https://www.npmjs.com/package/npm) (`npm` will be installed with `node`)
	```
	npm install -g typescript@2.3.4
	```
- Install [gulp](https://www.npmjs.com/package/gulp) via [npm](https://www.npmjs.com/package/npm)
	```
	npm install -g gulp@3.9
	```
- Upgrade [npm](https://www.npmjs.com/package/npm) to version `3.3.x`
	```
	npm install -g npm@5
	```
- Install the IDE
	- [Visual Studio Code](https://code.visualstudio.com/)
	
## Contributing ##

This project welcomes contributions and suggestions.  Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

- Ensure that it builds
	- Via `gulp`
		```
		cd <REPO ROOT>
		gulp build
		```	
- Ensure that tests pass
	- Via `gulp`
		```
		cd <REPO ROOT>
		gulp test
		```

## Developing on OS X ##

- Visual Studio Code

	- Point `Visual Studio Code` to the repo root
	- Install project dependencies 
		- via `npm` on the command line
			```
			cd <REPO ROOT>
			npm install 
			```
	- Build (`Cmd-Shift-B`)
	- Run (`F5`)
	- Testing
		- via `Visual Studio Code` (`Cmd-Shift-T`)
		- via `gulp` on the command line
			```
			cd <REPO ROOT>
			gulp test
			```

---
_Source: https://npm.io/package/app-metadata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
