我想把一个“率/审查这个应用程序”功能到我的应用程序。

是否存在一种方法能够直接链接到应用商店中他们评论应用的屏幕?所以用户不需要点击主应用程序链接。谢谢。

编辑:由于缺乏回应,开始赏金。为了确保这一点非常清楚:我知道我可以链接到应用商店中我的应用页面,并让用户从那里点击到“审查这款应用”屏幕。问题是是否有可能直接链接到“审查这个应用程序”屏幕,这样他们就不需要点击任何东西。


当前回答

引用自苹果开发者文档

方法中继续包含持久链接 应用程序的设置或配置屏幕,深度链接到您的 App Store产品页面。自动打开用户所在的页面 可以在App Store写评论,附加查询参数吗 action=写评论到你的产品URL。

URL是这样的:

= write-review itms-apps: / / itunes.apple.com/app/idYOUR_APP_ID ?行动

其他回答

以上方法都是正确的,但是现在使用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 11解决方案

在新的iOS 11应用商店中,短的应用商店url无法正确打开“写评论”界面。例如,这是行不通的:

https://itunes.apple.com/app/id333903271?mt=8&action=write-review

解决方法是在URL中包含两个字母的国家代码和应用程序名称,例如:

https://itunes.apple.com/us/app/twitter/id333903271?mt=8&action=write-review

or

itms-apps://itunes.apple.com/us/app/twitter/id333903271?mt=8&action=write-review

你可以从这里获得应用程序的完整URL: https://linkmaker.itunes.apple.com/

这将成功打开iOS 11应用商店中的“写评论”界面。

编辑:正如下面@Theo提到的,如果应用程序名称发生变化,国家代码不需要本地化,URL中的应用程序名称也不需要更新。

希望苹果能尽快解决这个问题。看到rdar: / / 34498138

在iOS 11+(新的应用商店)中有一种新方法来做到这一点。您可以直接打开“Write a Review”对话框。

以iOS 11为例:

itms-apps://itunes.apple.com/us/app/id1137397744?action=write-review

or

https://itunes.apple.com/us/app/id1137397744?action=write-review

注:

需要国家代码(/us/)。可以是任何国家代码,没关系。 将应用id(1137397744)更改为您的应用id(从iTunes URL获取)。 如果你想要支持旧的iOS版本(11之前),你需要一些条件逻辑,只有当OS版本大于或等于11时才会以这种方式链接。

对于>= iOS8:(简化@EliBud的回答)。

#define APP_STORE_ID 1108885113

- (void)rateApp{
    static NSString *const iOSAppStoreURLFormat = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d";

    NSURL *appStoreURL = [NSURL URLWithString:[NSString stringWithFormat:iOSAppStoreURLFormat, APP_STORE_ID]];

    if ([[UIApplication sharedApplication] canOpenURL:appStoreURL]) {
        [[UIApplication sharedApplication] openURL:appStoreURL];
    }
}

已接受的答案未能加载“评审”选项卡。我发现下面的方法加载“审查”标签没有“详细信息”标签。

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id={APP_ID}&pageNumber=0&sortOrdering=2&mt=8"]];

将{APP_ID}替换为你的app store app id。