react-native-open-maps
react-native-open-maps copied to clipboard
On iOS, open Google Maps if present, else open Apple Maps
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.
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 and @arhmnsh what's the status of this? I can make a PR with this addition. What do you think?
@brh55 a PR has been submitted
Anyone looking for a solution around this can use this fork
This is exactly the behavior I was looking for.
I too am looking for this behavior