增加清除小程序缓存的API

master
wangtao 2021-09-07 16:52:05 +08:00
parent 8bfa4fe80c
commit a24da10bff
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,16 @@
//
// MOP_removeUsedApplet.h
// mop
//
// Created by EDY on 2021/9/3.
//
#import "MOPBaseApi.h"
NS_ASSUME_NONNULL_BEGIN
@interface MOP_removeUsedApplet : MOPBaseApi
@end
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,24 @@
//
// MOP_removeUsedApplet.m
// mop
//
// Created by EDY on 2021/9/3.
//
#import "MOP_removeUsedApplet.h"
@implementation MOP_removeUsedApplet
- (void)setupApiWithSuccess:(void (^)(NSDictionary<NSString *,id> * _Nonnull))success failure:(void (^)(id _Nullable))failure cancel:(void (^)(void))cancel
{
NSLog(@"begin");
if (!self.param || !self.param[@"appId"]) {
NSLog(@"removeUsedApplet失败打印");
failure(@{@"errMsg": @"removeUsedApplet:fail 2"});
return;
}
[[FATClient sharedClient] removeAppletFromLocalCache:self.param[@"appId"]];
NSLog(@"removeUsedApplet成功回调");
success(@{});
}
@end