IOS 获取当前设备安装的所有App

来源:互联网 发布:photoshop 2017 mac 编辑:程序博客网 时间:2024/06/05 14:40

该方法是私有方法,需 进行动态调用和字符串拼接进行混淆来通过苹果验证。


#include <objc/runtime.h>    Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");    NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];    NSLog(@"apps: %@", [workspace performSelector:@selector(allApplications)]);



    NSDictionary *infoDictionary = [[NSBundlemainBundle]infoDictionary];

    NSLog(@"infoDictionary:%@",infoDictionary);


infoDictionary  :

A dictionary, constructed from the bundle's Info.plist file, that contains information about the receiver. If the bundle does not contain anInfo.plist file, a valid dictionary is returned but this dictionary contains only private keys that are used internally by theNSBundle class. The NSBundle class may add extra keys to this dictionary for its own use.





http://itunes.apple.com/search?term=需要查询程序名字&entity=software 该请求为POST请求。

返回的JSON格式数据。通过解析JSON数据,查询关键字:

trackViewUrl 为应用程序的 itunes的URL;

trackId 为应用程序的id;

http://itunes.apple.com/lookup?id=trackId 可以定位查询某APP,该请求为POST请求。





0 0