Created
October 9, 2014 08:38
-
-
Save shiweifu/32e68186318d3235950a to your computer and use it in GitHub Desktop.
获取所有安装的App 的bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <objc/runtime.h> | |
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); | |
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; | |
NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cycript 三句半:
c = objc_getClass("LSApplicationWorkspace")
a = c.defaultWorkspace
a.allApplications