---
name: "getAppInfo"
mode: "kit"
versionRequirements:
  - { name: "BizKit", version: "3.0.0" }
platform:
  - "iOS"
  - "Android"
async: true
---

## getAppInfo

> [VERSION] BizKit >= 3.0.0

> [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 | - | Callback when the API call completes (runs on both success and failure) |
| `success` | `(params: Object) => void` ↓see below | No | - | Callback when the API call succeeds |
| `fail` | `(params: Object) => void` ↓see below | No | - | Callback when the API call fails |

#### 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/region calling code string Example: countryCode: "86" (Mainland China) |
| `regionCode` | `string` | `3.1.2` | Region service code; derived from the current network region or user domain configuration Corresponds to the service field in the RN API Example: 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: Daily 1: Pre-release 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` | Extended error code |
| `errorMsg` | `string` | Extended error information |


### Examples

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