使用原生app内嵌uniapp应用时,会将应用编译成wgt包,然后在app中显示出来。
这个时候有两个sdk的版本概念:
- app自身的sdk有一个sdk的版本号,这个可以通过“plus.runtime”获取,如下所示,其中uniVersion就是原生app的sdk版本
{ "appid": "HBuilder", "arguments": "", "version": "13.1.18", "innerVersion": "1.9.9.80859", "uniVersion": "3.1.18", "launchLoadedTime": "414", "launcher": "default", "origin": "default", "processId": 1700, "startupTime": "1626255394554", "restart": "function() { [native code] }", "install": "function() { [native code] }", "getProperty": "function() { [native code] }", "quit": "function() { [native code] }", "openURL": "function() { [native code] }", "launchApplication": "function() { [native code] }", "setBadgeNumber": "function() { [native code] }", "openFile": "function() { [native code] }", "isStreamValid": "function() { [native code] }", "openWeb": "function() { [native code] }", "isApplicationExist": "function() { [native code] }", "processDirectPage": "function() { [native code] }", "isCustomLaunchPath": "function() { [native code] }", "updateInfo": "function() { [native code] }", "getDCloudId": "function() { [native code] }", "agreePrivacy": "function() { [native code] }", "disagreePrivacy": "function() { [native code] }", "isAgreePrivacy": "function() { [native code] }", "downloadFile": "function() { [native code] }", "versionCode": 130118, "channel": "" }
问题:还有一个sdk是编译应用时使用的sdk版本号,这个版本号如何获取?