Runtime获取手机上所有app的bundleID

首先包含头文件 

#include

 

在demo中写如下代码 

    Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");

    NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];

    NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);

你可能感兴趣的:(Runtime获取手机上所有app的bundleID)