Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get iOS version?

I'm facing the difficulty to retrieve iOS version and according to this 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 but seems like unable to retrieve iOS Version too.

May I know how you guys handle that?

like image 621
Isaac Avatar asked Sep 17 '18 06:09

Isaac


1 Answers

Detecting the iOS version

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);
like image 93
Anbu.Karthik Avatar answered Oct 11 '22 01:10

Anbu.Karthik