# Object wx.getLaunchOptionsSync()

Start from base library version 2.1.2. Please remaining backward compatible.

with Promise style call: Not supported

Mini Program plugin: Support, need to Mini Program base library version no less than 2.9.4

Gets the parameters for startup of the Mini Programs. and App.onLaunch The callback parameters of.

# Return value

# Object

Starting parameter

attribute type Introductions
path string Path to start Mini Programs (Code packet path)
scene number Start the Mini ProgramScene value
query Object Start the Mini Program query parameter
shareTicket string Share Ticket, seeGet more forwarding information
referrerInfo Object Source information. From another little program, Official Account message template or App Returns when entering the Mini Program. Otherwise return {}。(See below for attention)
forwardMaterials Array.&ltObject&gt An array of open file information that is only carried when opened from the chat material scene (scene 1173)
chatType number From WeChat group chat/Talk about opening Mini Program, chatType Express specific WeChat group chat/Chat type

referrerInfo Structure

attribute type Introductions
appId string Source Mini Program, Official Account message template or App of appId
extraData Object Source Mini Program passed data, scene = 1037 or 1038 support

forwardMaterials Structure

attribute type Introductions
type string File mimetype type type
name string file name
path string File path (url if webview)
size number file size

chatType Legal value

value Introductions Minimum version
1 WeChat contact single chat
2 Enterprise WeChat contact single chat
3 Common WeChat group chat
4 Enterprise WeChat group chat

# Return valid referrerInfo The scene

Scene value scene AppId meaning
1020 Official Account message template profile List of page - related Mini Programs source Official Account message template
1035 Official Account message template Custom menu source Official Account message template
1036 App Share Message Card Source App
1037 Mini Program open Mini Program Source Mini Program
1038 Back from another Mini Program Source Mini Program
1043 Official Account message template Template message source Official Account message template
1069 Mobile app Source App

# Be careful

Partial Version NoreferrerInfoWill return when undefinedRecommended for use options.referrerInfo && options.referrerInfo.appId To judge.