Download the iOS SDK before development as instructed in Resource Center > Development Resource > Resource Download > iOS Resource Download.
Example of the redirect from a mobile app to a Mini Program:
WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];
launchMiniProgramReq.userName = userName; //Username of the launched Mini Program
launchMiniProgramReq.path = path; // Path that can contain parameters, used to launch a page of the Mini Program. If it is not specified, the homepage of the Mini Program is launched by default.
launchMiniProgramReq.miniProgramType = miniProgramType; //Type of the launched Mini Program
return [WXApi sendReq:launchMiniProgramReq];
Callback Description
-(void)onResp:(BaseResp *)resp
{
if ([resp isKindOfClass:[WXLaunchMiniProgramResp class]])
{
NSString *string = resp.extMsg;
// The extraData field data in the corresponding JsApi navigateBackApplication
}
}
For information on the redirect back from the Mini Program to the mobile app, refer to <a href="https://developers.weixin.qq.com/miniprogram/dev/api/launchApp.html"target="_blank">Mini Program Development Document.