Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_classperformSelector:@selector(defaultWorkspace)];
NSArray *allApplications = [workspaceperformSelector:@selector(allApplications)];//这样就能获取到手机中安装的所有App
NSLog(@"%@",allApplications);
2. //http://www.apple.com/cn/itunes/charts/ 在AppStore上的软件url
3.
NSString *urlString = [NSStringstringWithFormat:@"WeChat://"];//最好去shareSDK中查找
if([[UIApplicationsharedApplication]openURL:[NSURLURLWithString:urlString]])
{
//有软件直接打开
}
else
{
//没有软件就去apstore里下载
NSString*appstroe=[NSStringstringWithFormat:@"https://itunes.apple.com/cn/app/wei-xin/id414478124?mt=8&v0=WWW-GCCN-ITSTOP100-FREEAPPS&l=&ign-mpt=uo%3D4"];
[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:appstroe]];
}