Appstore請求接口? ?http://itunes.apple.com/cn/lookup?id=xxxxxx
更新內(nèi)容從接口獲取? ?json["results"][0]["releaseNotes"].rawString()!
跳轉(zhuǎn)到App Store,其中id后面的xxxxxxx換成對應(yīng)的appid,appid可以在開發(fā)者網(wǎng)站找到
let urlString = "itms-apps://itunes.apple.com/app/idxxxxxxxx"
? ? ? ? ? ? ? ? if?let?url =URL(string: urlString) {
? ? ? ? ? ? ? ? ? ? //根據(jù)iOS系統(tǒng)版本,分別處理
? ? ? ? ? ? ? ? ? ? if#available(iOS10, *) {
? ? ? ? ? ? ? ? ? ? ? ? UIApplication.shared.open(url, options: [:],
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? completionHandler: {
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (success)in
? ? ? ? ? ? ? ? ? ? ? ? })
? ? ? ? ? ? ? ? ? ? }else{
? ? ? ? ? ? ? ? ? ? ? ? UIApplication.shared.openURL(url)
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }