I have a detached to ExpoKit app and when I call await getCurrentPosition()
, I get the error on a real device iPhone 10s Max:
{"line":1334,"column":227,"sourceURL":"https://xxx.cloudfront.net/xxx-30.0.0-ios.js"}
It is working in the Simulator, however.
Any suggestions to try?
const getCurrentPositionPromise = () =>
new Promise((resolve, reject) => {
return navigator.geolocation.getCurrentPosition(resolve, reject);
});
export const getCurrentPosition = async () => {
var t0 = performance.now();
const position = await getCurrentPositionPromise();
var t1 = performance.now();
alert(`getCurrentPosition\n${t1 - t0} ms\n${JSON.stringify(position, null, 2)}`);
return position;
};