iOS6 introduced StoreKit framework which is designated for interacting with the AppStore from within the app. I easily managed to direct the user to a specific app, the question is how can I detect whether the user actually installed the app I redirected him to?
Asked
Active
Viewed 530 times
2
-
Do you mean from a different app? – Marcus Adams Jul 03 '13 at 17:59
-
yes. The same way Facebook app uses to advertise different apps – Rizon Jul 03 '13 at 18:02
-
Possible duplicate of http://stackoverflow.com/questions/7226406/get-list-of-all-installed-apps – edwardmp Jul 03 '13 at 18:22
2 Answers
1
This is usually done by calling -canOpenURL:
on UIAplication
object like this:
NSURL *appURL = [NSURL URLWithString:@"fb:"];
BOOL appInstalled = [[UIApplication sharedApplication] canOpenURL:appURL];
But you need to know what URL scheme does the second app open. It is declared in Info.plist file by the app developer.

Tricertops
- 8,492
- 1
- 39
- 41
-
1This is not very helpful and I'll explain why - Right after installing the app (using SKStoreProductViewController), the delegated is called (before the app actually completes installation process). So the call for 'canOpenURL' happens too soon and thus returns false. – Rizon Jul 03 '13 at 23:22
-
1Your argument is invalid. That code works. It detects if the app is installed. If the app is not installed (yet), it returns false. I don't know about any other way to detect that. Just check multiple times or use timer every 5 seconds or something. – Tricertops Jul 04 '13 at 06:24
0
There is an open source framework called "iHasApp" avaiable that can detect installed apps. Git Repository: iHasApp

edwardmp
- 6,339
- 5
- 50
- 77
-
I looked into it, iHasApp doesn't work. Its a pre-list of "some" not all apps. See this answer http://stackoverflow.com/questions/17152049/installed-app-sizes-vs-appstore-app-sizes – Sam B Jul 04 '13 at 01:45
-
You can't get a list of all of the apps! There is no non-private API for doing so. – WWJD May 21 '14 at 13:27