openAppWithApppId
The openAppWithApppId API is called by the super app to open mini programs with appId, the unique ID of the mini program.
Method signature
func openApp(withApppId appId: String, extraParams: [String: Any]?, error: ()) throws -> UIViewController?Request parameters
| Name | Type | Description | Required | 
| appId | String | The unique ID that is assigned by Mini Program Platform to identify a mini program. You can get the ID from the Mini Program Platform console or by fetching mini program information with the fetchApps API. | M | 
| extraParams | [String: Any]? | This parameter is used to pass startup parameters to IAPMini Program SDK to customize the behavior of a mini program during startup. See Startup parameters for details. | O | 
Response parameters
N/A
Error codes
| Error code | Error message | Description | Further action | 
| 90002 | GRV_CONTAINER_NOT_INITIALIZED | IAPMiniProgram SDK is not initialized. | Initialize the SDK. | 
| 90003 | GRV_CONTAINER_ERROR_UNKNOWN | Parameter error. | Refer to the Request parameters table and check if all parameter types are correct and if all required parameters are specified. | 
Sample
do {
    let appId = "xxx"
    let extraParams = ["query": "a=b&c=d"]
    let viewController = try GRVAppContainerLaunch.sharedInstance().openApp(withApppId: appId, extraParams: extraParams, error: ())
} catch {
}