improv get iOS version

This commit is contained in:
iddoeldor 2020-11-05 17:43:26 +02:00 committed by GitHub
parent 6fe08f607c
commit f533235530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2242,7 +2242,18 @@ UIDevice.$ownMethods
console.log(method, ':', UIDevice[method]())
})
console.log('executablePath =', ObjC.classes.NSBundle.mainBundle().executablePath().toString());
```
```js
if (ObjC.available) {
var processInfo = ObjC.classes.NSProcessInfo.processInfo();
var versionString = processInfo.operatingSystemVersionString().toString();
// E.g. "Version 13.5 (Build 17F75)"
var ver = versionString.split(' ');
var version = ver[1];
// E.g. 13.5
console.log("iOS version: " + version);
}
```
<details>