不越狱获取bundleid

2021-05-11  本文已影响0人  阳明先生_X自主

// 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)]);
    }
上一篇 下一篇

猜你喜欢

热点阅读