UNPKG

react-native-check-version

Version:

Check if the user is running the latest version of the app

30 lines (25 loc) 685 B
import { PlatformOSType } from "react-native"; export type CheckVersionUpdateType = "major" | "minor" | "patch"; export interface CheckVersionOptions { endpoint?: string; platform?: PlatformOSType; bundleId?: string; currentVersion?: string; country?: string; } export interface CheckVersionResponse { version: string; released?: Date; // iOS only url: string; notes?: string; // iOS only needsUpdate: boolean; updateType?: CheckVersionUpdateType; platform?: PlatformOSType; bundleId?: string; lastChecked?: string; country?: string; error?: Error; } declare const checkVersion: ( options?: CheckVersionOptions ) => Promise<CheckVersionResponse>;