// Opening a mini program through the mini program ID// Open the mini program through the mini program id// @param appID Mini program ID - Mini program ID// @param verType Specify the mini program type - The version type of mini program to open// @param scene Scene value - scene value// @param firstPage Open pages - open the page// @param paramsStr Bring in parameters - brings in parameters// @param parentVC Which vc to call from - Which vc to call from// @param completion Wrong callback - error callback- (void)startUpMiniAppWithAppID:(NSString *)appIDverType:(TMAVersionType)verTypescene:(TMAEntryScene)scenefirstPage:(NSString * _Nullable)firstPageparamsStr:(NSString * _Nullable)paramsStrparentVC:(UIViewController *)parentVCcompletion:(void (^)(NSError * _Nullable))completion;etion;
Name | Required | Type | Description |
appID | Yes | NSString | The mini program ID to open |
verType | Yes | TMAVersionType | The type of mini program to open |
scene | Yes | TMAEntryScene | The scene value for opening the mini program |
firstPage | No | NSString | The page to open |
paramsStr | No | NSString | The parameter used to open a page |
parentVC | Yes | UIViewController | The view controller to call from |
completion | Yes | block | Wrong callback |
[[TMFMiniAppSDKManager sharedInstance] startUpMiniAppWithAppID:appId parentVC:self completion:^(NSError * _Nullable error) {NSLog(@"open applet error:%@",error);}];
[[TMFMiniAppSDKManager sharedInstance] startUpMiniAppWithAppID:appId verType:verType scene:TMAEntrySceneAIOEntry firstPage:nil paramsStr:nil parentVC:self completion:^(NSError * _Nullable error) {NSLog(@"open applet error:%@",error);}];
/// Open mini program using QR code/// @param qrData QR code content/// @param parentVC Which vc to call from/// @param completion Wrong- (void)startUpMiniAppWithQrData:(NSString *)qrDataparentVC:(UIViewController *)parentVCcompletion:(void (^)(NSError * _Nullable error))completion
Was this page helpful?