aeq
August 31, 2019, 6:43am
1
Hey guys,
Do we have like a central “utils class” whereby we can check the OS version?
In Uno, Objective-C and Java?
For example with Uno:
if (iOSVersionEqualTo(13)) {
//uno code
}
if (iOSVersionGreaterThan(13)) {
//uno code
}
if (AndroidVersionLessThan(8)) {
//uno code
}
The closest thing currently is probably the FuseJS/Environment
module.
https://fuseopen.com/docs/fusejs/environment.html
The mobileOSVersion
, android
and ios
fields should provide the information you need to implement the utility functions in your example.
aeq
August 31, 2019, 3:36pm
3
mortend:
FuseJS/Environment
Shweet man , I ended up using this from the Environment module for an Uno iOS version check:
Fuse.iOSDevice.OperatingSystemVersion.Major
aeq
September 4, 2019, 6:16am
4
If my .uno file is outside of fuselibs in a separate project, it doesn’t have access to Fuse.iOSDevice: Fuse does not contain type or namespace 'iOSDevice'. Could you be missing a package reference?
How can I explicitly add it to the project?