Skip to content

Instantly share code, notes, and snippets.

@shiweifu
Created October 9, 2014 08:38
Show Gist options
  • Save shiweifu/32e68186318d3235950a to your computer and use it in GitHub Desktop.
Save shiweifu/32e68186318d3235950a to your computer and use it in GitHub Desktop.
获取所有安装的App 的bundle
#include <objc/runtime.h>
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);
@shiweifu
Copy link
Author

shiweifu commented Oct 9, 2014

Cycript 三句半:

c = objc_getClass("LSApplicationWorkspace")
a = c.defaultWorkspace
a.allApplications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment