Sam*_*uel 158 iphone itunes rating app-store ios7
有谁知道用于要求用户评价我们的应用程序并直接在评级页面上为他打开App Store的技术是否仍在iOS 7上运行?
我曾经从我的应用程序打开这个网址:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=353372460&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
Run Code Online (Sandbox Code Playgroud)
但看起来它不再起作用了(AppStore显示空白页面).我也试过这个网址,但没有运气:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?pageNumber=0&sortOrdering=1&type=Purple+Software&mt=8&id=353372460
Run Code Online (Sandbox Code Playgroud)
Fra*_*ank 198
从iOS7开始,URL已更改,无法指向审阅页面,只能指向应用程序
itms-apps://itunes.apple.com/app/idAPP_ID
Run Code Online (Sandbox Code Playgroud)
APP_ID需要替换为您的应用程序ID.根据问题中的App ID,它将如下所示
itms-apps://itunes.apple.com/app/id353372460
Run Code Online (Sandbox Code Playgroud)
注意数字前面的id ...该字符串是id 353372460,而不仅仅是353372460
对于iOS7之前的任何内容,需要使用"旧"URL,只有那些可以直接进入评论页面.您还应注意,这些调用仅适用于设备.由于模拟器没有安装App Store应用程序,因此在模拟器中运行它们将无效.
请查看Appirater实例.https://github.com/arashpayan/appirater
无法帮助您使用phonegap细节(从未使用过它).但它基本上归结为检查用户正在运行的iOS版本,然后使用旧URL或新的iOS7 URL.
mkl*_*kll 166
以下URL在iOS 7.1上完美运行:
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=xxxxxxxx&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8
Run Code Online (Sandbox Code Playgroud)
这xxxxxxxx是您的应用ID.
更新.适用于iOS 9.3.4和iOS 10 GM(由Jeet提供)
Ida*_*dan 47
这适用于我(Xcode 5 - iOS 7 - 设备!):
itms-apps://itunes.apple.com/app/idYOUR_APP_ID
Run Code Online (Sandbox Code Playgroud)
对于低于iOS 7的版本,请使用旧版本:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID
Run Code Online (Sandbox Code Playgroud)
Jas*_*lla 18
单行代码简单替代方案: **另见下面的模拟器评论**
http://itunes.apple.com/app/idAPP_ID
编辑:既然iOS 7.1允许直接链接到App Store中的评论标签,那么值得投入额外的代码行直接到达那里:其余的请参见其他答案.
这里我们使用的是 http: 代替 itms-apps:,让iOS完成剩下的工作
我在iOS 6.1和7设备(iPad/iPhone/iPod touch 4)上获得了相同的结果测试.
具体来说,这个用于iOS 6的快捷方式将用户带到选项卡而不是选项卡.DetailsReviews
该Purple+Software链接将用户一直带到iOS 6中的"评论"选项卡,如果您知道如何检查操作系统,这显然是首选.
重要说明:这将导致iOS 5.1,6.1和7模拟器出错.
无法打开页面Safari无法打开页面,因为地址无效(我们知道它是模拟器外的任何浏览器上的有效URL)
需要明确的是:在iOS 7上:http://提供相同的体验itms-apps:,没有明显的延迟.
*请记住上面提到的模拟器行为.这与尝试通过模拟器访问摄像机并不完全不同:模拟器不是测试它的地方.*
Mur*_*ali 17
可以在iOS7中直接从应用程序打开评论页面.请使用以下网址...
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=YOUR_APP_ID
Run Code Online (Sandbox Code Playgroud)
这肯定会有效.. :)
Jos*_*ffy 16
目前尚不清楚支持哪种版本的iOS,但作为iOS 10.3的一部分,有一个新的查询参数可以添加到URL中:action=write-review.我已经在iOS 10.2和9.3.5上测试了这个并且它可以工作.但是,它在iOS 7.1.2上不起作用,因此在iOS 8.0和9.3.5之间添加了支持.需要进一步调查!
示例:https://itunes.apple.com/app/id929726748?action = write-review&mt = 8
这将打开"撰写评论"对话框,而不是仅显示评论标签.
+ (NSString *)getReviewUrlByAppId:(int)appId
{
NSString *templateReviewURL = @"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID";
NSString *templateReviewURLiOS7 = @"itms-apps://itunes.apple.com/app/idAPP_ID";
NSString *templateReviewURLiOS8 = @"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=APP_ID&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software";
//ios7 before
NSString *reviewURL = [templateReviewURL stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
// iOS 7 needs a different templateReviewURL @see https://github.com/arashpayan/appirater/issues/131
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 && [[[UIDevice currentDevice] systemVersion] floatValue] < 7.1)
{
reviewURL = [templateReviewURLiOS7 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
}
// iOS 8 needs a different templateReviewURL also @see https://github.com/arashpayan/appirater/issues/182
else if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
reviewURL = [templateReviewURLiOS8 stringByReplacingOccurrencesOfString:@"APP_ID" withString:[NSString stringWithFormat:@"%d", appId]];
}
return reviewURL;
}
Run Code Online (Sandbox Code Playgroud)
iOS9中的评论链接再次破裂.在进行一些实验时,我发现Apple将其恢复到iOS7之前的状态.所以你必须这样做:
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=247423477&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software
Run Code Online (Sandbox Code Playgroud)
247423477您的9位数应用ID 在哪里(主要区别在于您必须&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&type=Purple+Software在应用ID之后追加).
上面的所有答案现已被弃用(iOS 7,但可能有效),因此,我提供Apple建议提供应用程序链接的新方式.您的应用程序的链接是iTunes中的链接(使用复制链接),建议在代码中使用此链接:
Swift 3.0
let path = URL(string: "https://itunes.apple.com/us/app/calcfast/id876781417?mt=8")
UIApplication.shared.open(path!)
Run Code Online (Sandbox Code Playgroud)
或者更好 - 正确对待可选项并处理无法访问链接的可能性:
if let path = URL(string: "https://itunes.apple.com/us/app/calcfast/id876781417?mt=8") {
UIApplication.shared.open(path) {
(didOpen:Bool) in
if !didOpen {
print("Error opening:\(path.absoluteString)")
}
}
}
Run Code Online (Sandbox Code Playgroud)
Objective-C的
#define APP_URL_STRING @"https://itunes.apple.com/us/app/calcfast/id876781417?mt=8"
Run Code Online (Sandbox Code Playgroud)
然后你可以调用APP_URL_STRING你的代码:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: APP_URL_STRING] options:@{} completionHandler:nil];
Run Code Online (Sandbox Code Playgroud)
请注意,这是Apple现在推荐的方式,因为之前处理重定向链接的方法已被弃用且不受支持.
所有应用的链接,如果您有多个应用:
#define MYCOMPANY_URL_PATH @"http://appstore.com/mycompany"
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: MYCOMPANY_URL_PATH] options:@{} completionHandler:nil];
Run Code Online (Sandbox Code Playgroud)
建议将上面的App链接用于代码或用户未直接看到的链接.如果您想提供用户可以看到和记住的链接,请使用以下内容:
http://appstore.com/calcfast