tags:

views:

58

answers:

1

Hello! Is there an URL that will directly open an application in the App Store on the iPad without redirecting through Safari? I am interested in http:// links, not itms://, as I want them to be usable outside the device. The phobos links used on iPhone do not seem to work on the iPad.

+2  A: 

My current workaround is this:

NSURLRequest *myRequest = theRequest;
NSURL *urlFromMyRequest = [theRequest URL];

NSRange foundPhobosServer = [[urlFromMyRequest host] rangeOfString:@"phobos.apple.com"];
NSRange foundItunesServer = [[urlFromMyRequest host] rangeOfString:@"itunes.apple.com"];

    if(foundPhobosServer.location != NSNotFound || foundItunesServer.location != NSNotFound)
        [[UIApplication sharedApplication] openURL:[request URL]];

Basically I check the URL to see if it's coming from phobos.apple.com or itunes.apple.com. If it is, then I just ask the system to open it for me. The system can recognize if the URL is from the App Store and will do the right thing and open the App Store app.

Additional note: This will quit your app.

OlivaresF