Skip to content

Latest commit

 

History

History
237 lines (151 loc) · 2.68 KB

DOC_RENATIVE_RUNTIME.md

File metadata and controls

237 lines (151 loc) · 2.68 KB
id title sidebar_label
runtime
ReNative Runtime
Runtime

Runtime

ReNative provides runtime SDK library to support multi-platform development

import { Api } from 'renative'

Api

formFactor

import { Api } from 'renative'

Api.formFactor === 'mobile'

possible values: mobile, tv, watch, desktop, browser

returns string value of highest priority form factor

platform

import {
    Api,     
    IOS,
    ANDROID,
    ANDROID_TV,
    ANDROID_WEAR,
    WEB,
    TIZEN,
    TIZEN_MOBILE,
    TVOS,
    WEBOS,
    MACOS,
    WINDOWS,
    TIZEN_WATCH,
    KAIOS,
    FIREFOX_OS,
    FIREFOX_TV
  } from 'renative'

Api.platform === ANDROID_TV

returns string value of current platform

Platforms

Retruns true if specific platform matches

isAndroid

import { isAndroid } from 'renative'

isAndroid()

isAndroidtv

import { isAndroidtv } from 'renative'

isAndroidtv()

isAndroidwear

import { isAndroidwear } from 'renative'

isAndroidwear()

isIos

import { isIos } from 'renative'

isIos()

isTvos

import { isTvos } from 'renative'

isTvos()

isWeb

import { isWeb } from 'renative'

isWeb()

isWebos

import { isWebos } from 'renative'

isWebos()

isTizen

import { isTizen } from 'renative'

isTizen()

isTizenwatch

import { isTizenwatch } from 'renative'

isTizenwatch()

isTizenmobile

import { isTizenmobile } from 'renative'

isTizenmobile()

isMacos

import { isMacos } from 'renative'

isMacos()

isWindows

import { isWindows } from 'renative'

isWindows()

isFirefoxos

import { isFirefoxos } from 'renative'

isFirefoxos()

isFirefoxtv

import { isFirefoxtv } from 'renative'

isFirefoxtv()

isKaios

import { isKaios } from 'renative'

isKaios()

Form Factors

Returns true if specific form factor matches

isBrowser

import { isBrowser } from 'renative'

isBrowser()

returns true for platforms: web

isDesktop

import { isDesktop } from 'renative'

isDesktop()

returns true for platforms: macos, windows

isMobile

import { isMobile } from 'renative'

isMobile()

returns true for platforms: ios, android, tizenmobile, firefoxos, kaios

isTv

import { isTv } from 'renative'

isTv()

returns true for platforms: androidtv, tvos, tizen, webos, firefoxtv

isWatch

import { isWatch } from 'renative'

isWatch()

returns true for platforms: androidwear, tizenwatch