iOS-查看手机所有app的BundleID

利用Runtime查看所有BundleID。

1
2
3
4
5
#include <objc/runtime.h>
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);
YI wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!