mop-flutter-sdk/ios/Classes/Api/MOP_scanOpenApplet.m

30 lines
989 B
Dart
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

//
// MOP_scanOpenApplet.m
// mop
//
// Created by beetle_92 on 2021/6/7.
//
#import "MOP_scanOpenApplet.h"
#import "MOPTools.h"
#import <FinApplet/FinApplet.h>
@implementation MOP_scanOpenApplet
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel {
NSLog(@"MOP_scanOpenApplet%@", self.info);
FATAppletDecryptRequest *req = [[FATAppletDecryptRequest alloc] init];
req.info = self.info;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIViewController *currentVC = [MOPTools topViewController];
[[FATClient sharedClient] startAppletWithDecryptRequest:req InParentViewController:currentVC completion:^(BOOL result, FATError *error) {
NSLog(@"打开小程序:%@", error);
} closeCompletion:^{
NSLog(@"关闭小程序");
}];
});
}
@end