RexOnRoids
RexOnRoids

Reputation: 14040

How to go to the app store (from within app) programmatically?

After clicking on a UIView I want to take the user of my app OUT of my app and to another app on the app store. How do i do it?

Upvotes: 5

Views: 3948

Answers (3)

ghr
ghr

Reputation: 516

Modernising in Objective-C

NSString *appString = @"https://apps.apple.com/app/app-name/app-id";
NSURL *url = [NSURL URLWithString:appString];
[[UIApplication sharedApplication] openURL:url
                                   options:@{}
                         completionHandler:nil];

Upvotes: 0

gagarwal
gagarwal

Reputation:

Call

[[UIApplication sharedApplication] openURL:@"APP_STORE_URL_OF_EXISTING_APP"]

This will automatically quit your application and launch App Store application.

Upvotes: 0

Tuomas Pelkonen
Tuomas Pelkonen

Reputation: 7821

NSString *buyString=@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=APP_ID&mt=8";

NSURL *url = [[NSURL alloc] initWithString:buyString];
[[UIApplication sharedApplication] openURL:url];
[url release];

Upvotes: 13

Related Questions