0

我想在 iTunes 中打开应用程序链接,同时点击“评价这个应用程序”链接。但问题是

“无法继续您的请求”或“无法连接到 itune 商店”。

它只发生在 iPad mini 中。否则工作正常。请任何人都可以解决这个问题。

+ (void)rateApp {
#if TARGET_IPHONE_SIMULATOR
    NSLog(@"APPIRATER NOTE: iTunes App Store is not supported on the iOS simulator. Unable to open App Store page.");   
#else
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

    // added work arround for wrong URL Scheme used in new App store on iOS 6
    NSString *reviewURL;
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) {
        reviewURL = [templateReviewURLiOS6 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]];

        reviewURL = [reviewURL stringByReplacingOccurrencesOfString:@"LANGUAGE" withString:[NSString stringWithFormat:@"%@", [[NSLocale preferredLanguages] objectAtIndex:0]]];
        NSLog(@"reviewURL: %@",reviewURL);

    } else {
        reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", APPIRATER_APP_ID]];
    }

    [userDefaults setBool:YES forKey:kAppiraterRatedCurrentVersion];
    [userDefaults synchronize];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
#endif
}
4

0 回答 0