I think it's OkCupid's website that is able to detect if you have installed their AppStore app, and then switch over to it from their website if it does indeed exist on the local device (eg, iPhone, iPad). Does anyone know how to accomplish this? I know how to detect when the web app is being run in either regular or standalone mode, but I don't know how I would detect/switch over from a regular broswer session.
Detect standalone app and switch over to it
303 Views Asked by Doug At
3
There are 3 best solutions below
0

Custom URL scheme are the way for one app to load another app. here one source bit there is lot of info on this.
http://mobiledevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
0

This can be done quite easily, with something called iOS URL Schemes.
Here's how:
- Open your application's
Info.plist
file. - Right-click and add the following row: "URL Types" (or
CFBundleURLTypes
) - Expand "Item 1" and add edit the URL Name to be your application's identifier. (i.e.
com.companyName.AppName
) - Add a second row to "Item 1", and call it "URL Schemes" (or
CFBundleURLSchemes
) - Edit the URL scheme to whatever you want. This URL will automatically open your application. (i.e. a value of
appName
will cause any URL starting withappName://
to open your app)
This is all that's necessary to achieve this functionality. However, you may want to pass information to your app with this URL. In that case, just implement a custom handler, like this:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
if (!url) {
return NO;
}
NSString *URLString = [url absoluteString];
// Do whatever you want with this string.
return YES;
}
Gotta hand it to Apple for making this such a seamless process. Good luck on your app!
Please read this Documentation, it is possible if OKCupid has a URL Scheme to do so.
Communicating with other apps