Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone sdk - open app store to specific app?

Tags:

Is there a way to open the app store to a specific application? I tried using something like the following:

[[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284417350&mt=8&uo=6"]];

But got the following: "Safari cannot open the page because to many redirects occurred".

like image 422
Kyle Avatar asked Oct 04 '09 20:10

Kyle


6 Answers

Apparently this issue only affects the simulator. A build an go on the device works perfect.

like image 183
Kyle Avatar answered Sep 28 '22 15:09

Kyle


Another simple way is:

[[UIApplication sharedApplication] openURL: [NSURL URLWithString:@"itms-apps://itunes.com/app/YourAppNameWithoutSpaces"]];

This is very clean

like image 41
Dima Deplov Avatar answered Sep 30 '22 15:09

Dima Deplov


You can open app without opening safari

NSString *appId = @"you appid"; //like 999999999
NSString *link = [@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=" stringByAppendingString:appId];

[[UIApplication sharedApplication] openURL: [NSURL URLWithString:link]];
like image 42
Tim Kozak Avatar answered Sep 29 '22 15:09

Tim Kozak


Use http://itunes.com/app/YourAppNameWithoutSpaces

See also this.

like image 23
MrMage Avatar answered Sep 30 '22 15:09

MrMage


Replace iTunesLink with your App URL.

 NSString *iTunesLink = @"https://itunes.apple.com/us/app/digital-speedometer-pro/id1021728349?mt=8";

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
like image 3
PRITAM SATPUTE Avatar answered Sep 26 '22 15:09

PRITAM SATPUTE


Starting from iOS 6 right way to go is using SKStoreProductViewController class.

Code is here: https://stackoverflow.com/a/32008404/1151916

like image 1
Ramis Avatar answered Sep 26 '22 15:09

Ramis