直接跳转到好评页面,区分设备系统版本型号
// 获取AppStore地址
- (NSString*)getAppStoreURL:(NSString*)_appId
{
NSString* _curAppIdString = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@?mt=8", _appId];
float _curValue = [[UIDevice currentDevice].systemVersion floatValue];
if ( _curValue >= 11.0f)
{
_curAppIdString = [NSString stringWithFormat:@"https://itunes.apple.com/cn/app/id%@?mt=8&action=write-review", _appId];
}else if(_curValue >= 6.0f)
{
_curAppIdString = [NSString stringWithFormat:@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%@&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8", _appId];
}
return _curAppIdString;
}
本文介绍了一种根据iOS系统版本动态生成AppStore链接的方法,以便用户能够直接跳转到应用的好评页面。该方法通过判断当前设备系统版本来决定使用何种格式的URL。
339

被折叠的 条评论
为什么被折叠?



