本文介绍了 iOS 端查询所有已安装的离线包和小程序的 ID、获取指定小程序包信息、获取已安装小程序包信息和删除小程序包信息的方法。
查询所有已安装的离线包和小程序的 ID
接口说明
代码示例
NSArray *res = [[MPNebulaAdapterInterface shareInstance] allAppIds];
获取指定小程序包信息
接口说明
代码示例
NSDictionary *res = [[MPNebulaAdapterInterface shareInstance] allAppsForAppId:@[@"2020012000000001"]];
获取已安装小程序包信息
接口说明
代码示例
NSDictionary *res = [[MPNebulaAdapterInterface shareInstance] installedApps:@{@"2020012000000001":@""}];
删除指定小程序包信息
接口说明
代码示例
[[MPNebulaAdapterInterface shareInstance] clearAllAppInfo:@"2020012000000001"]; NSDictionary *app = [[MPNebulaAdapterInterface shareInstance] allAppsForAppId:@[@"2020012000000001"]]; NSString *res = @"删除失败"; if(!app){ res = @"删除成功"; }else{ res = @"删除失败"; } UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"message" message:[NSString stringWithFormat:@"%@", res] delegate:nil cancelButtonTitle:nil otherButtonTitles:@"ok", nil]; [alert show];
该文章对您有帮助吗?