getEnterOptionsSync()

Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid

Description

Get the parameters for this miniapp launch. If it is a cold start, the return value matches the App.onLaunch callback parameters; if it is a warm start, it matches App.onShow.

Parameters

None

Return Value

Type: Object↓
PropertyTypeDescriptionMiniKit Since
pathstringPath used to launch the miniapp (code package path)-
scene1000 | 1001 | 1002Launch scene valuev3.15.0
Query parameters used to launch the miniapp-
Share/forward-
apiCategorystringAPI category: default - default category; embedded - embedded; miniapps opened via the half-screen miniapp capability-
Extra parameters for launching the miniapp, typically container-added, non-business parametersv3.21.0
rendererstringRendering type: native indicates Lynx self-rendering; empty/other indicates Webv3.37.0

Valid Values

return.scene
ValueDescriptionMiniKit Since
1000Default valuev3.15.0
1001Launched via the Recently Used Mini Programs listv3.15.0
1002Launched via URL mappingv3.15.0

Examples

import { getEnterOptions } from '@ray-js/ray'

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