安卓是指定包名跳轉(zhuǎn)茧泪,iOS需要指定id
if (plus.os.name == "Android") {
// 跳轉(zhuǎn)安卓應(yīng)用市場(chǎng)
let appurl = "market://details?id=com.tencent.mm" //這個(gè)是通用應(yīng)用市場(chǎng),如果想指定某個(gè)應(yīng)用商店,需要單獨(dú)查這個(gè)應(yīng)用商店的包名或scheme及參數(shù)
plus.runtime.openURL(appurl)
} else {
// 跳轉(zhuǎn)AppStore
let appleId = 純數(shù)字id
plus.runtime.launchApplication({
action: `itms-apps://itunes.apple.com/cn/app/id${appleId}`,
})
}