I am using getCurrentPositionAsync() from expo-location to fetch user’s location and this is how I am using this
import * as Location from "expo-location";
Location.getCurrentPositionAsync({
accuracy: 6
}).then(currentPosition => {
console.log('user location', currentPosition);
});
In all Android devices it’s taking hardly 2 seconds to capture location. But in all iOS devices it takes more than 8 seconds(I am confirming this by testing in multiple iOS devices) even though mobile network is so good.
Do I have to do anything else especially for the sake of iOS devices?
If nothing is required especially for iOS devices, May I know why is it taking too much time in iOS devices only?
For me, lowering the accuracy did not make it faster but did indeed lost in precision.
I have an older version of the app on SDK 42 and expo-location 10 and it works perfectly (fast and precise) on the exact same iphones where now it takes 10sec +.
IMPORTANT EDIT: An important info I just tested, using Location.watchPositionAsync(options, callback) instead of Location.getCurrentPositionAsync with the same implementation works fast on the exact same Iphones (we get precision and fast coordinates) which confirms that there is most probably a bug in the Location.getCurrentPositionAsync method.