Skip to main content
Version: 3.x

Taro.getLaunchOptionsSync()

Obtains the parameters upon Mini Program startup. The callback parameters are consistent with those of App.onLaunch.

NOTE

In some versions, when there is no referrerInfo, the value undefined is returned. You can use options.referrerInfo && options.referrerInfo.appId to make a judgment.

Reference

Type

() => LaunchOptionsApp

Parameters

API Support

APIWeChat Mini-ProgramH5React Native
Taro.getLaunchOptionsSync✔️