I need to get the Versions of all the installed applications programmatically for non-jailbroken iOS devices. Is it Possible to achieve this?
Asked
Active
Viewed 1,239 times
2
-
Only if you Jailbreak. – Avi Jan 18 '16 at 07:24
-
What is your "use case"? Because Apple don't have a public API to violate user privacy. – Black Frog Jan 18 '16 at 07:51
-
@avi: i guess OP asking for getting version number so i posted the answer anyeay if you have better answer then please put and explain it :) – Nitin Gohel Jan 18 '16 at 07:54
2 Answers
3
That's possible, please try the below code.
Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace");
NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)];
for (LSApplicationProxy *apps in [workspace performSelector:@selector(allApplications)])
{
NSString *localizedName = apps.localizedName;
if([apps.applicationType isEqualToString:@"User"])
{
NSLog(@"\nlocalizedName: %@",localizedName);
NSLog(@"minimumSystemVersion: %@",apps.minimumSystemVersion);
NSLog(@"fileSharingEnabled: %d",apps.fileSharingEnabled);
NSLog(@"sdkVersion: %@",apps.sdkVersion);
NSLog(@"teamID: %@",apps.teamID);
}
}
For this you need to place 4 classes in your app:
LSApplicationWorkspace, LSResourceProxy, LSBundleProxy, LSApplicationProxy.

Bista
- 7,869
- 3
- 27
- 55

Mahendra Kumar
- 59
- 7
-
How can I get the Installed date and Last Updated date of all the applications ? – Nandy Jan 20 '16 at 08:55
-
Does apple approve the this code which used below runtime classes ? LSApplicationWorkspace, LSResourceProxy, LSBundleProxy, LSApplicationProxy. – Stalin Pusparaj Jul 14 '16 at 12:20
-
-
My app was rejected while using this, please don't use this for submission to app store. – zaheer Aug 19 '17 at 12:24
0
In iOS8 and before, we can use canOpenUrl to get installed applications which registered schemes. In iOS9, you must add a "white list" into your info.plist file. Only the application in the "white list" can be checked. And the limit count of the "white list" is 50. So you'd better jailbreak your device.
See more information: How to check particular app is already installed on iphone device or not?
Another one: http://useyourloaf.com/blog/querying-url-schemes-with-canopenurl.html

Community
- 1
- 1

Harrison Xi
- 766
- 1
- 5
- 23
-
You can do the same in iOS 9, but you have to "pre-declare" which schemes you will be using. – Avi Jan 18 '16 at 07:52