https://kotlinlang.org logo
#ios
Title
# ios
p

phldavies

01/19/2021, 10:39 AM
Is there any documentation or examples around using properties from newer iOS versions? We cannot seem to access
CLLocation.speedAccuracy
(iOS 10+) or
CLLocation.courseAccuracy
(iOS 13.4+) from Kotlin. Ideally we would still support older iOS but utilise
courseAccuracy
when on iOS 13.4+ (similar to
#available
in swift)
t

Tijl

01/19/2021, 10:47 AM
both are there for me, make sure you use kotlin 1.4.20+ for
courseAccuracy
. I would assume
speedAccuracy
has been there much longer though.
p

phldavies

01/19/2021, 10:49 AM
speedAccuracy
is not present in 1.3.71 (our current target - looking to move to 1.4.x soon)
is there any way to use a def file to tell kotlin native that the fields are available?
the problem is that of course it will not magically add a single field to the standard library, you’ll have to have your own copy
I’d prioritise the 1.4 upgrade
1
2 Views