不是跳转到 App Store,而是直接打开应用界面,像「网易应用中心」2.0 那样。
解决方案
比如一个app的网页url是:https://itunes.apple.com/cn/app/xue-qiu-gu-piao-tou-zi-she-qu/id492180369?mt=8&uo=4
那么native的url就是将协议https
改成itms-apps
,在你的app里打开替换后的url就可以跳转到app store了,你可以在这里找到app的url:http://itunes.apple.com/linkmaker
模态打开app store
可以使用SKStoreProductViewController:
NSDictionary *appParameters = [NSDictionary dictionaryWithObject:@"533886215" forKey:SKStoreProductParameterITunesItemIdentifier];SKStoreProductViewController *productViewController = [[SKStoreProductViewController alloc] init];[productViewController setDelegate:self];[productViewController loadProductWithParameters:appParameters completionBlock:^(BOOL result, NSError *error){}];[self presentViewController:productViewController animated:YES completion:^{ }];