# react-native-install-app

> A library to manage install app for React Native

Latest version **0.0.13** (published 2017-12-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-install-app
pnpm add react-native-install-app
yarn add react-native-install-app
bun add react-native-install-app
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2017-12-14 |
| First published | 2017-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | yy030913 |
| Maintainers | yy030913 |
| Keywords | react-native, updates, dynamic, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-install-app
- Repository: https://github.com/yy030913/react-native-install-app
- Homepage: https://github.com/yy030913/react-native-install-app#readme
- Issues: https://github.com/yy030913/react-native-install-app/issues
- npm.io page: https://npm.io/package/react-native-install-app

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.13 (latest) — 2017-12-14
- 0.0.12 — 2017-12-14
- 0.0.11 — 2017-12-14
- 0.0.10 — 2017-12-14
- 0.0.9 — 2017-12-14
- 0.0.8 — 2017-12-14
- 0.0.7 — 2017-12-14
- 0.0.6 — 2017-12-14
- 0.0.5 — 2017-12-14
- 0.0.4 — 2017-12-14
- 0.0.3 — 2017-12-14
- 0.0.2 — 2017-12-14
- 0.0.1 — 2017-12-14

## README

## Usage (iOS)

First you need to install react-native-install-app:

```
npm install react-native-install-app --save
```

### Adding automatically with react-native link

At the command line, in your project folder, type:

`react-native link react-native-install-app`

Done! No need to worry about manually adding the library to your project.

## Examples

### Basic

```javascript
// require the module
import {
  installApp,
  installAppFromStore
} from 'react-native-install-app';

// get a list of files and directories in the main bundle
// android
installApp().then((result) => {
    console.log('GOT RESULT', result);

    // stat the first file
  }).catch((err) => {
    console.log(err.message, err.code);
  });
// ios
installAppFromStore()
```

### `installApp(options: DownloadFileOptions): { jobId: number, promise: Promise<DownloadResult> }`

```
type DownloadFileOptions = {
  fromUrl: string;          // URL to download file from
  toFile: string;           // Local filesystem path to save the file to
  headers?: Headers;        // An object of headers to be passed to the server
  progressDivider?: number;
  begin?: (res: DownloadBeginCallbackResult) => void;
  progress?: (res: DownloadProgressCallbackResult) => void;
  resumable?: () => void;    // only supported on iOS yet
  connectionTimeout?: number // only supported on Android yet
  readTimeout?: number       // supported on Android and iOS
};
```
```
type DownloadResult = {
  jobId: number;          // The download job ID, required if one wishes to cancel the download. See `stopDownload`.
  statusCode: number;     // The HTTP status code
  bytesWritten: number;   // The number of bytes written to the file
};
```

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