您的位置:首页 > 移动开发

ios开发之 获取APP版本号/跳转APPStore(下载页/评论页)

2017-06-26 00:00 148 查看
摘要: ios开发之 获取APP版本号/跳转APPStore(下载页/评论页)

让我们回到项目设置页面,区分一下



代码如下,一般都是写在AppDelegate



//版本号CFBundleShortVersionString不可改

NSString*shotVersion = [infoDicobjectForKey:@"CFBundleShortVersionString"];

//发布版本号CFBundleVersion不可改

NSString*appVersion = [infoDicobjectForKey:@"CFBundleVersion"];

NSLog(@"内测版本号是%@,发布版本号是%@",shotVersion,appVersion);


跳转到苹果商店下载页面



NSString*str = [NSStringstringWithFormat:@"itms-apps://itunes.apple.com/app/id%d",1024XXXXX];

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:str]];


跳转到苹果商店评论页面



NSString*str = [NSStringstringWithFormat:

@"http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=%d&pageNumber=0&sortOrdering=2&type=Purple+Software&mt=8",1024XXX];

[[UIApplicationsharedApplication]openURL:[NSURLURLWithString:str]];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: