iPhone sdk - open app store to specific app?

对着背影说爱祢 提交于 2019-11-29 02:56:53
Kyle

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

Another simple way is:

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

This is very clean

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]];

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]];
Ramis

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!