Error when trying to open native map (iOS/Google) applications

Please provide the following:

  1. SDK Version: 48.0.0
  2. Platforms(Android/iOS/web/all): iOS
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Hello,

I am using the following code to open the native maps application for iOS/Android. I work on managed workflow.
After the update to SDK 48.0, this has stopped working and I see the error below

export const openMaps=(lat, lng)=>{

const scheme = Platform.select({ ios: ‘maps:0,0?q=’, android: ‘geo:0,0?q=’ });
const latLng = ${lat},${lng};
const label = “Report’s Location”;
const url = Platform.select({
ios: ${scheme}${label}@${latLng},
android: ${scheme}${latLng}(${label})
});
Linking.openURL(url);
}

Error

Error: Unable to open URL: file:///private/var/containers/Bundle/Application/6953B93F-0EC0-4E9D-B083-B73CADC7F522/Expo%20Go.app/maps:0,0%3Fq=Report’s%20Location@37.9133,23.7061
at promiseMethodWrapper ,

Please for your help

Regards,
Yannis

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