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:


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 =;
    const position = await getCurrentPositionPromise();
    var t1 =;
    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 and it works.

Glad you figured things out @booboothefool!