org.ssgroup.sope.cordova.upgrade
支持强制升级与选择升级
插件已经开源在https://github.com/shenshouer/org.ssgroup.sope.cordova.upgrade
新版本号已经更新,但还未提交至github
此插件为一个cordova ios版本号插件,用户检查本地app的一些信息以及从app store中检查是否有新版本号,并提示更新
安装
cordova plugin add https://github.com/shenshouer/org.ssgroup.sope.cordova.upgrade
改动org.ssgroup.sope.cordova.upgrade/src/ios/CDVUpgrade.m中:
// 改动成你自己app的信息
self.appInfoUrl = @"http://itunes.apple.com/cn/lookup?id=284910350";
self.appUpgradeUrl = @"http://itunes.apple.com/cn/lookup?
id=284910350";
接口
somai.upgrade.getAppName(successHandler, errorHandler);
somai.upgrade.getPackageName(successHandler, errorHandler);
somai.upgrade.getVersionNumber(successHandler, errorHandler);
somai.upgrade.getVersionCode(successHandler, errorHandler);
// 从app store中对照当前版本号。并弹出提示是否更新
somai.upgrade.checkUpgrade(successHandler, errorHandler);
## 样例參考
https://github.com/shenshouer/upgradeTest1
时间: 2024-10-06 00:17:40