Reputation: 14040
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
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
Reputation:
Call
[[UIApplication sharedApplication] openURL:@"APP_STORE_URL_OF_EXISTING_APP"]
This will automatically quit your application and launch App Store application.
Upvotes: 0
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