iOS navigator.geolocation.getCurrentPosition gives cloudfront error on real device

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;
};

Found it. It doesn’t like that performance library…

For some reason that works in Simulator, but not real device. I removed those performance.now() and it works.

Glad you figured things out @booboothefool!