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

40 lines
852 B
Dart
Raw Normal View History

2020-04-26 14:57:08 +08:00
//
// MOP_currentApplet.m
// mop
//
// Created by 康旭耀 on 2020/4/16.
//
#import "MOP_currentApplet.h"
#import <FinApplet/FinApplet.h>
@implementation MOP_currentApplet
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel
{
FATAppletInfo *info = [[FATClient sharedClient] currentApplet];
if(info != nil)
{
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
dic[@"appId"] = info.appId;
dic[@"name"]= info.appTitle;
dic[@"icon"]= info.appAvatar;
dic[@"description"]=info.appDescription;
dic[@"version"] = info.appVersion;
dic[@"thumbnail"]=info.appThumbnail;
success(dic);
}
else
{
success(@{});
}
}
2022-05-17 11:23:32 +08:00
+ (void)load {
}
2020-04-26 14:57:08 +08:00
@end