---
name: "canIUse"
mode: "kit"
versionRequirements:
  - { name: "BaseKit", version: "3.15.1" }
platform:
  - "iOS"
  - "Android"
async: true
title: "canIUse - 版本要求"
---

## canIUse

> [VERSION] BaseKit >= 3.15.1

> [PLATFORM] iOS, Android

> ⚡ **支持 Promise 调用** — 不传 success / fail / complete 回调时，该方法返回 Promise。

### 描述

判断API，回调，参数等是否在当前版本可用。

### 参数

`Params`

| 参数 | 类型 | 必填 | 默认值 | 描述 |
| --- | --- | --- | --- | --- |
| `schema` | `string` | 是 | - | 使用 ${API}.${method}.${param}.${option}方式来调用 |

### 示例代码

#### Demo

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

const result = canIUse("ty.getSystemInfo");
console.log("canIUse ty.getSystemInfo:", result);
```
