getAppInfo(params: Object)

Requires:
BizKit≥3.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { getAppInfo } from '@ray-js/ray';

// Promise usage
try {
  const res = await getAppInfo();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Description

Get the current app’s business information

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescriptionBizKit Since
serverTimestampnumberserverTimestamp server-side timestampv3.1.2
appVersionstringappVersion app versionv3.1.2
languagestringlanguage app language packv3.1.2
countryCodestringCountry code, returns the country/region telephone dialing code string Example return: countryCode: "86" (Mainland China)v3.1.2
regionCodestringRegional service code, derived from the current network region or user domain configuration Corresponds to the service field in the RN API Example return: regionCode: "AY" (China region)v3.1.2
appNamestringappName app namev3.1.2
appIconstringappIcon app iconv3.1.2
appEnvnumberapp environment 0: dev 1: staging 2: productionv3.1.2
appBundleIdstringapp package namev3.1.2
appSchemestringapp schemev3.1.2
appIdstringapp IDv3.2.2
clientIdstringapp clientIdv4.2.0
accessibilityModebooleanWhether Accessibility mode is enabledv4.27.1
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { getAppInfo } from '@ray-js/ray'

getAppInfo({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});