---
name: "getLaunchOptionsSync"
mode: "kit"
versionRequirements:
  - { name: "MiniKit", version: "1.0.0" }
platform:
  - "iOS"
  - "Android"
title: "getLaunchOptionsSync - 获取小程序启动时的参数。与 App.onLaunch 的回调参数一致。的同步版本"
---

## getLaunchOptionsSync

> [VERSION] MiniKit >= 1.0.0

> [PLATFORM] iOS, Android

### 描述

获取小程序启动时的参数。与App.onLaunch的回调参数一致。

### 参数

无


### 引用对象

##### `interface` ReferrerInfo

| 属性 | 类型 | 最低版本 | 描述 |
| --- | --- | --- | --- |
| `appId` | `string` | `3.2.0` | 来源小程序的 appId |
| `extraData` | `Record<string, any>` | `3.2.0` | 来源小程序传过来的数据，特定scene支持 |


### 示例代码

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