---
name: "getLaunchOptionsSync"
mode: "kit"
versionRequirements:
  - { name: "MiniKit", version: "1.0.0" }
  - { name: "@ray-js/ray", version: "0.3.23" }
platform:
  - "iOS"
  - "Android"
---

## getLaunchOptionsSync

> [VERSION] MiniKit >= 1.0.0 | @ray-js/ray >= 0.3.23

> [PLATFORM] iOS, Android

### Description

Get the parameters passed when the miniapp starts. Same as the App.onLaunch callback parameters.

### Parameters

None


### Referenced Types

##### `interface` ReferrerInfo

| Property | Type | Since | Description |
| --- | --- | --- | --- |
| `appId` | `string` | `3.2.0` | appId of the source Mini App |
| `extraData` | `Record<string, any>` | `3.2.0` | Data passed from the source Mini App; supported in specific scenes |


### Valid Values

##### `scene` valid values

| Value | Description |
| --- | --- |
| `1000` | Default value |
| `1001` | Launched via the Recently Used Mini Programs list |
| `1002` | Launched via URL mapping |


### Examples

#### Demo

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

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