// 1.获取bundleid
id space = [NSClassFromString(@"LSApplicationWorkspace") performSelector:@selector(defaultWorkspace)];
NSArray *plugins = [space performSelector:@selector(installedPlugins)];
NSMutableSet *list = [[NSMutableSet alloc] init];
for (id plugin in plugins) {
id bundle = [plugin performSelector:@selector(containingBundle)];
if (bundle)
[list addObject:bundle];
}
for (id plugin in list) {
NSLog(@"applicationIdentifier=%@", [plugin performSelector:@selector(applicationIdentifier)]);
}
网友评论