---
name: "getAppInfo"
mode: "kit"
versionRequirements:
  - { name: "BizKit", version: "3.0.0" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getAppInfo

> [VERSION] BizKit >= 3.0.0 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

> ⚡ **Supports Promise** — Returns a Promise when success / fail / complete callbacks are omitted.

### Description

Get the current app’s business information

### Parameters

| Property | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `complete` | `() => void` | No | - | Completion callback (executed on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | Callback on successful API call |
| `fail` | `(params: Object) => void` ↓see below | No | - | Failure callback |

#### success callback parameters

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `serverTimestamp` | `number` | `3.1.2` | serverTimestamp server-side timestamp |
| `appVersion` | `string` | `3.1.2` | appVersion app version |
| `language` | `string` | `3.1.2` | language app language pack |
| `countryCode` | `string` | `3.1.2` | Country code, returns the country/region telephone dialing code string Example return: countryCode: "86" (Mainland China) |
| `regionCode` | `string` | `3.1.2` | Regional 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) |
| `appName` | `string` | `3.1.2` | appName app name |
| `appIcon` | `string` | `3.1.2` | appIcon app icon |
| `appEnv` | `number` | `3.1.2` | app environment 0: dev 1: staging 2: production |
| `appBundleId` | `string` | `3.1.2` | app package name |
| `appScheme` | `string` | `3.1.2` | app scheme |
| `appId` | `string` | `3.2.2` | app ID |
| `clientId` | `string` | `4.2.0` | app clientId |
| `accessibilityMode` | `boolean` | `4.27.1` | Whether Accessibility mode is enabled |

#### fail callback parameters

| Property | Type | Description |
| --- | --- | --- |
| `errorMsg` | `string` | Error message |
| `errorCode` | `string \| number` | Error code |
| `innerError` | `Object` | Error extension |

##### fail(params).innerError properties

| Property | Type | Description |
| --- | --- | --- |
| `errorCode` | `string \| number` | Error extension code |
| `errorMsg` | `string` | Error extension message |


### Examples

#### Demo

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

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