Get altitude using expo-location returns 0

“sdkVersion”: “35.0.0”
Running on iOS simulator.
expo install expo-location

Using the sample code from expo, and running an expo managed project I am wanting the altitude. I get, as a return, this:

Object {
“coords”: Object {
“accuracy”: 5,
“altitude”: 0,
“altitudeAccuracy”: -1,
“heading”: -1,
“latitude”: 50.785834,
“longitude”: -222.406417,
“speed”: -1,
},
“timestamp”: 1575824489555.97,
}

So while it works, I’m not getting any altitude information. I’m not getting any permission request either, but then I have been playing around with other code where permissions were requested so I assume it only asks once per day on iOS.

Fwiw it works for me on my Samsung Galaxy S8 using the example from here:

https://docs.expo.io/versions/v35.0.0/sdk/location/#usage

Yes, looks like an emulator problem. Opening expo via the QR code works on my iPhone and galaxy phone works with their sample project, so just a simulator issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.