0.2.0 • Published 2 years ago

react-native-package-time v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-package-time

Get the packaging(build / compile) time for your app.

Installation

yarn add react-native-package-time

or

npm i react-native-package-time

Don't forget to run pod install under your project /ios folder.

Usage

import PackageTime from 'react-native-package-time';

// or

import { getPackageTime } from 'react-native-package-time';

// Unix timestamp, in milliseconds.
getPackageTime().then((time): nubmer => {
  console.log(time); // 1638201352000
});

API

MethodParamReturn TypeiOSAndroidDescription
getPackageTime()-Promise<number>truetrueThe packaging(build / compile) time of App
getFirstInstallTime()-Promise<number>truetrueThe first install time of App (It will not change until uninstallation)
getLastUpdateTime()-Promise<number>truetrueThe update install time of App (On iOS, Version or Build changes is required)

How to run the example project

  1. Clone the code from master branch.
  2. Go into the root directory of this project, and run yarn or npm install.
  3. Go into the /example/ios directory, and run pod install. (Optional, only for running example on iOS device)
  4. Under the directory /example, run yarn android or npm run android for Android device, and yarn ios or npm run ios for iOS device.

Todo

  • Get the first installation time of the app.
  • Get the update installation time of the app.

License

MIT