#####This project was made as a "proof of concept" demonstration of how to detect apps installed on an iOS device, from early 2011. Since then, it has been used extensively in many apps, to the point where Apple made the decision to ban the excessive use of -canOpenURL:
, the method which iHasApp relies upon to determine app installation. As a result, using a list of URL schemes for app detection is no longer a viable method.
######Statement from Apple:
We found that your app uses public APIs in a manner not prescribed by Apple, which is not in compliance with the iOS Developer Program License Agreement, as required by the App Store Review Guidelines.
In particular, section 3.3.1 of the iOS Developer Program License Agreement specifies:
"Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs"
Specifically, we found this app misuses "canOpenURL:" to extrapolate which apps are installed on a device.
The iHasApp
iOS Framework allows you to detect installed apps on a user's device. Detection results can be in the form of an array of detected appIds, or an array of appDictionaries from the iTunes Search API.
- How does it detect apps?
- How was schemeApps.json compiled?
- Why is it not detecting all of my apps?
- Will using iHasApp get my app rejected?
- How To Detect Installed iOS Apps - (Feb 2011)
- Detailed iPhone App IPA Statistics - (May 2011)
- Add the
iHasApp
subfolder to your project and ensure that it is linked to the project target. - Add
#import "iHasApp.h"
to the classes in which you wish to access iHasApp. - Initialize and begin detection methods.
Example code:
iHasApp *detectionObject = [[iHasApp alloc] init];
[detectionObject detectAppDictionariesWithIncremental:^(NSArray *appDictionaries) {
NSLog(@"Incremental appDictionaries.count: %i", (int)appDictionaries.count);
} withSuccess:^(NSArray *appDictionaries) {
NSLog(@"Successful appDictionaries.count: %i", (int)appDictionaries.count);
} withFailure:^(NSError *error) {
NSLog(@"Failure: %@", error.localizedDescription);
}];
- iOS base SDK 5.0+
Note: schemeApps.json only adds ~180kB to your final, compiled IPA
The iHasApp
framework utilizes only public, documented, and non-deprecated APIs. It is completely App Store safe. There are already a number of approved apps on the App Store that have integrated iHasApp.
Like all things, it is always a prudent idea to either ask your users' permission or to include a clause in your EULA.
This framework comes with an example application that demonstrates detection initialization and information display.
The iHasAppExample project uses Olivier Poitrey's SDWebImage project to asynchronously display the app icons.
- Website: iHasApp
- Author: Daniel Amitay
- Email: [email protected]