29,028
社区成员
发帖
与我相关
我的任务
分享
int (*MobileInstallationBrowse)(NSDictionary *options, int (*callback)(NSDictionary *dict, id value), id value);
int MobileInstallationBrowseImplementation(NSDictionary *options, int (*callback)(NSDictionary *dict, id value), id value)
{
NSLog(@"MobileInstallationBrowseImplementation");
return 0;
}
static int callback(NSDictionary *dict, id result)
{
NSArray *currentlist = [dict objectForKey:@"CurrentList"];
if (currentlist)
{
for (NSDictionary *appinfo in currentlist)
{
[(NSMutableArray*)result addObject:[appinfo copy]];
}
}
return 0;
}
-(void)btnGetApp
{
NSMutableArray *result = [NSMutableArray new];
MobileInstallationBrowse = MobileInstallationBrowseImplementation;
MobileInstallationBrowse([NSDictionary dictionaryWithObject:@"Any" forKey:@"ApplicationType"], callback, result); //Any 代表所有程序,这里可以用 “System” “User”来区分系统和普通软件
}