Giter Site home page Giter Site logo

congshengwu / react-native-package-time Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 365 KB

Get some state timestamps of app. (Build, install, update)

License: MIT License

JavaScript 10.52% Kotlin 26.96% Starlark 3.28% Ruby 6.94% Swift 11.27% Objective-C 13.26% TypeScript 14.38% Java 13.40%

react-native-package-time's Introduction

react-native-package-time

Get some state timestamps of 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

Method Param Return Type iOS Android Description
getPackageTime() - Promise<number> true true The packaging(build / compile) time of App
getFirstInstallTime() - Promise<number> true true The first install time of App (It will not change until uninstallation)
getLastUpdateTime() - Promise<number> true true The 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

react-native-package-time's People

Contributors

congshengwu avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.