iOS逆向 获取手机所有app的bundle Id

Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
    NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];

    NSArray *arr = [workspace performSelector:@selector(allApplications)];

    for (id obj in arr) {
        NSLog(@"obj:%@", obj);
    }
    NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);

你可能感兴趣的:(iOS逆向)