如何获取 iOS 版本?
How to get iOS version?
我遇到了检索 iOS 版本的困难,根据这个 link https://github.com/facebook/react-native/issues/3766 , it seems there isn't gonna be any support to retrieve iOS Version. I've tried third partyprovider 但似乎也无法检索 iOS 版本。
请问你们是怎么处理的?
On iOS, the Version is a result of -[UIDevice systemVersion], which is a string with the current version of the operating system. An example of the system version is "10.3". For example, to detect the major version number on iOS:
import {Platform} from 'react-native';
const majorVersionIOS = parseInt(Platform.Version, 10);
console.log("iOS version " + majorVersionIOS);
我遇到了检索 iOS 版本的困难,根据这个 link https://github.com/facebook/react-native/issues/3766 , it seems there isn't gonna be any support to retrieve iOS Version. I've tried third partyprovider 但似乎也无法检索 iOS 版本。
请问你们是怎么处理的?
On iOS, the Version is a result of -[UIDevice systemVersion], which is a string with the current version of the operating system. An example of the system version is "10.3". For example, to detect the major version number on iOS:
import {Platform} from 'react-native';
const majorVersionIOS = parseInt(Platform.Version, 10);
console.log("iOS version " + majorVersionIOS);