Appstore请求接口 http://itunes.apple.com/cn/lookup?id=xxxxxx
更新内容从接口获取 json["results"][0]["releaseNotes"].rawString()!
跳转到App Store,其中id后面的xxxxxxx换成对应的appid,appid可以在开发者网站找到
let urlString = "itms-apps://itunes.apple.com/app/idxxxxxxxx"
if let url =URL(string: urlString) {
//根据iOS系统版本,分别处理
if#available(iOS10, *) {
UIApplication.shared.open(url, options: [:],
completionHandler: {
(success)in
})
}else{
UIApplication.shared.openURL(url)
}
}
网友评论