Detect ios version using libgdx using robovm backend

According to this answer we need to know the version of ios. How can I achieve this with libgdx robovm backend?

+6
source share
3 answers

When launched under RoboVM java.lang.System.getProperty("os.version") iOS version will return.

+10
source

Easier to use if you are in the iOS module:

 import org.robovm.apple.foundation.Foundation; Foundation.getMajorSystemVersion() // and Foundation.getMinorSystemVersion() 
+1
source
 import org.robovm.apple.foundation.FoundationVersionNumber; if (FoundationVersionNumber.getVersion() < FoundationVersionNumber.Version_iOS_8_0) 
0
source

Source: https://habr.com/ru/post/957561/


All Articles