我想把一个“率/审查这个应用程序”功能到我的应用程序。
是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。
编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。
我想把一个“率/审查这个应用程序”功能到我的应用程序。
是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。
编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。
当前回答
上面写的一切都是正确的。这只是一个插入到应用中的示例,并将{YOUR app ID}更改为实际的应用ID,从iTunesconnect中获取,以显示评论页面。请注意,正如上面所评论的,它不能在模拟器上工作-只是在设备上。
修正,因为iOS 7的变化。 修正iOS 10+ openURL更改 对于iOS 13.6+的审查URL是可以访问的,在版本6.0之前使用。它直接开到评论页面。代码更新
NSString * appId = @"{YOUR APP ID}";
NSString * theUrl = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software",appId];
int vers = (int) [[UIDevice currentDevice].systemVersion integerValue];
if (vers > 6 && vers < 12 ) theUrl = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@",appId];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:theUrl] options:@{} completionHandler:nil];
其他回答
iOS 4抛弃了“删除速率”功能。
目前,对应用进行评级的唯一方式是通过iTunes。
编辑:链接可以通过iTunes Link Maker生成到你的应用。这个网站有一个教程。
以上方法都是正确的,但是现在使用SKStoreProductViewController可以带来更好的用户体验。要使用它,你需要做以下工作:
implement SKStoreProductViewControllerDelegate protocol in your app delegate add required productViewControllerDidFinish method: - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController { [viewController dismissViewControllerAnimated: YES completion: nil]; } Check if SKStoreProductViewController class is available and either show it or switch to the App Store: extern NSString* cAppleID; // must be defined somewhere... if ([SKStoreProductViewController class] != nil) { SKStoreProductViewController* skpvc = [[SKStoreProductViewController new] autorelease]; skpvc.delegate = self; NSDictionary* dict = [NSDictionary dictionaryWithObject: cAppleID forKey: SKStoreProductParameterITunesItemIdentifier]; [skpvc loadProductWithParameters: dict completionBlock: nil]; [[self _viewController] presentViewController: skpvc animated: YES completion: nil]; } else { static NSString* const iOS7AppStoreURLFormat = @"itms-apps://itunes.apple.com/app/id%@"; static NSString* const iOSAppStoreURLFormat = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@"; NSString* url = [[NSString alloc] initWithFormat: ([[UIDevice currentDevice].systemVersion floatValue] >= 7.0f) ? iOS7AppStoreURLFormat : iOSAppStoreURLFormat, cAppleID]; [[UIApplication sharedApplication] openURL: [NSURL URLWithString: url]]; }
这在iOS 9 - 11上运行良好。
还没有测试早期版本。
[NSURL URLWithString:@"https://itunes.apple.com/app/idXXXXXXXXXX?action=write-review"];
这是我在我的应用程序中使用的代码;
-(void)rateApp {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[@"itms-apps://itunes.apple.com/app/" stringByAppendingString: @"id547101139"]]];
}
let rateUrl = "itms-apps://itunes.apple.com/app/idYOUR_APP_ID?action=write-review"
if UIApplication.shared.canOpenURL(rateUrl) {
UIApplication.shared.openURL(rateUrl)
}