Determine if an application has been downloaded from an integrated iOS app store

I show with one click the button inside my application, the application in the appstore. The application will appear in the SKStoreProductViewController with the contents of the application store. Now, is there any way to determine if the user clicked the installation on the displayed application or, even better, be warned if the user clicked intall and the application completed the installation? Since the user in my application is thus able to buy a filling version, I want to exit the process after the download is complete.

+4
source share
1 answer

I do not think that you can determine if the user clicked the installation or the application is installed using SKStoreProductViewController [docs] . Only the iOS API provides loadProductWithParameters:completionBlock:

But if you want to check if your application is installed or not, there are other ways -

1) Using a custom URL scheme. Define a custom URL scheme for your application, and then check with UIApplication -canOpenURL: It will only tell you that an application capable of opening this URL scheme is not necessary which application. There is no public mechanism for checking what other applications the user has installed on his device. Custom URL scheme validation can be done something like this:

 BOOL fullApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:NSString* urlString = [NSString stringWithFormat:@"yourFULLAppURL://"]]];   if(!fullApp) { NSLog(@"INVALID URL"); //Or alert or anything you want to do here } 

2) If you manage both applications, you can also use a common keychain or cardboard to communicate between them in more detail.

+4
source

All Articles