首页新闻招聘找找看知识库
  • 浏览:196 2017-06-28 17:25 来自 甘林梦

        Class c = NSClassFromString(@"LSApplicationWorkspace");

        id s = [(id)c performSelector:NSSelectorFromString(@"defaultWorkspace")];

        NSArray *array = [s performSelector:NSSelectorFromString(@"allInstalledApplications")];

        for (id item in array)

        {

            NSLog(@"%@",[item performSelector:NSSelectorFromString(@"applicationIdentifier")]);

            NSLog(@"%@",[item performSelector:NSSelectorFromString(@"bundleIdentifier")]);

            NSLog(@"%@",[item performSelector:NSSelectorFromString(@"bundleVersion")]);

            NSLog(@"%@",[item performSelector:NSSelectorFromString(@"shortVersionString")]);

            NSLog(@"%@",[item performSelector:NSSelectorFromString(@"itemName")]);

            

        }

登录后才能评论,请先登录注册