30
2019
09

private api


 Class LSApplicationWorkspace = objc_getClass("LSApplicationWorkspace");


    




    id workspace = [LSApplicationWorkspace  performSelector:NSSelectorFromString(@"defaultWorkspace")];


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


    


    for (id LSApplicationProxy_class in appList)


        {


            NSString *bundleID = [LSApplicationProxy_class performSelector:@selector(applicationIdentifier)];


            NSString *version =  [LSApplicationProxy_class performSelector:@selector(bundleVersion)];


            NSString *shortVersionString =  [LSApplicationProxy_class performSelector:@selector(shortVersionString)];


            NSLog(@"bundleID:%@\n version: %@\n ,shortVersionString:%@\n", bundleID,version,shortVersionString);


        }


    


    NSBundle *b = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/FTServices.framework"];


    BOOL success = [b load];


    


    Class FTDeviceSupport = NSClassFromString(@"FTDeviceSupport");


    id si = [FTDeviceSupport valueForKey:@"sharedInstance"];


    


    NSLog(@"-- %@", [si valueForKey:@"deviceColor"]);

« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。