在一个可能的iOS7应用程序中评分和审查?

我听说iOS7允许用户在该应用程序中对应用程序进行评分和查看,避免了redirect到appstore和离开应用程序的需要。 到目前为止,我只发现在iTunes评价url和iOS 7中提到的价格function的URL链接(请求用户评价我们的应用程序)中的差异, AppStore显示一个空白页面 ,但不是如何留在应用程序。

我正在使用Appirater在我的应用程序,并集成了新的url和应用程序去appstore率/审查。

有人可以告诉我,如果这个新function在那里,如何实现它?

我想你正在寻找SKProductViewController。

您可以使用以下代码显示SKProductViewController:

NSDictionary *parameters = [NSDictionary dictionaryWithObject:@"YOURITUNESAPPID" forKey:SKStoreProductParameterITunesItemIdentifier]; SKProductViewController *productViewController = [[SKProductViewController alloc] init]; [self presentViewController:productViewController animated:YES completion:nil]]; 

这假定你在一个UIViewController子类中,并知道你的iTunes应用程序标识符。 这将显示一个模型viewController,显示该应用程序的AppStore条目。

用户可以从该viewController留下评级。 虽然没有能够写评论。

我用Appirater也有同样的问题,我用这种方式部分解决了问题

定义iOS7的模板:

NSString *templateReviewURLiOS7 = @"itms-apps://itunes.apple.com/app/idAPP_ID";

使rateApp方法变成这样

 + (void)rateApp { . . . // this URL Scheme should work in the iOS 6 App Store in addition to older stores NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]]; // iOS 7 needs a different templateReviewURL @see https://github.com/arashpayan/appirater/issues/131 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { reviewURL = [templateReviewURLiOS7 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%@", _appId]]; } . . . } 

这将像过去一样在iOS6中打开价格页面,在iOS7中打开应用程序页面