react-native-open-maps icon indicating copy to clipboard operation
react-native-open-maps copied to clipboard

On iOS, open Google Maps if present, else open Apple Maps

Open arhmnsh opened this issue 6 years ago • 6 comments

Is it possible to open Google Maps if it is installed, else open Apple Maps?

Currently, if the provider is 'google' on iOS, and Google Maps is not installed, it opens Google Maps in browser, which isn't a good experience IMHO.

arhmnsh avatar May 22 '19 21:05 arhmnsh

I completely agree with you! That would definitely improve the user experience if we only open apps available. Unfortunately, it's not currently implemented, but implementation would involve something like this: https://stackoverflow.com/questions/47652375/check-if-google-maps-app-is-installed-in-react-native-ios

Afterward, the developer using the package would just need to add the URL schemes in their app configuration if you want to ensure this package can fall back on an app level.

If you feel up for the task, please give it a whirl! I'm a bit busy these days with personal things but will provide some guidance.

brh55 avatar May 23 '19 17:05 brh55

@brh55 and @arhmnsh what's the status of this? I can make a PR with this addition. What do you think?

nwaughachukwuma avatar Oct 06 '19 17:10 nwaughachukwuma

@brh55 a PR has been submitted

nwaughachukwuma avatar Oct 06 '19 20:10 nwaughachukwuma

Anyone looking for a solution around this can use this fork

nwaughachukwuma avatar Nov 16 '19 04:11 nwaughachukwuma

This is exactly the behavior I was looking for.

daveyjones avatar Sep 06 '20 18:09 daveyjones

I too am looking for this behavior

lucksp avatar Feb 03 '23 20:02 lucksp