setQuery
The setQuery function is used to retrieve information about the current mini program startup information.
Method signature
copy
func setQuery(_ query: String?)
Parameters
Parameter | Data Type | Default value | Required | Description |
query | String | "" | Yes | This parameter is used to retrieve information about the current mini program startup and pass it with key-value pairs to the mini program. The value of this parameter must be in the form of |
Sample
copy
let param = GRVStartupParams()
param.query = "key=value&key2=value2"
let viewController = try GRVAppContainerLaunch.sharedInstance().openApp(withUrl: url, startupParams: param)
let navigationController = self.navigationController ?? UIApplication.shared.windows.first?.rootViewController as? UINavigationController
navigationController?.pushViewController(viewController, animated: true)