-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preferGoogleMaps is not working #25
Comments
Hmm, that's strange, because the demo app in this repo does open Google Maps with that preference passed in. Can you confirm that? git clone https://github.com/EddyVerbruggen/nativescript-directions
cd nativescript-directions/src
npm run demo.ios.device Then hit the 'from address to coord' button (last button). If that works, then what you can try in your project:
|
@EddyVerbruggen Hello and thanks for answering :D I couldnt replicate demo app because I am working in Windows with NativeScript SideKick but I could run this issue in the NS Playground: https://play.nativescript.org/?template=play-vue&id=L4M2rY As you can see I set preferGoogleMaps as true. Hope you can replicate this issue. |
Ha, you're running the app inside the Playground app, which doesn't have nativescript-directions installed. I saw you added it yourself (good thinking!), but the only piece missing is the plist entry that allows the app to query the OS whether or not the Google Maps app is installed: nativescript-directions/src/platforms/ios/Info.plist Lines 5 to 8 in 1e4aec8
Since it can't determine that without this plist entry, it falls back to Apple Maps. The waypoint overrides that behavior, but that's a different issue really. So I think your code is correct, and once you run it as a standalone app it'll probably work just fine. |
Ohhh well, I added Thanks for your time! |
THANK YOU! I'd be happy to merge any code/doc you want to PR. |
I test with
I am doing something bad? |
That’s hard to tell without the actual code. Can you share a minimal repo? |
I uploaded this https://github.com/chrisalexqm/directionstest tell me if you can run it |
@chrisalexqm Runs fine. I didn't have Google Maps on my iPad so it opened Apple Maps. Then I installed the Google Maps apps and this prompt was shown (as expected): In Dutch: "Directions wants to open Google Maps. [Cancel / Open]" After accepting this (one-time) prompt it opened Google Maps. So all is working fine with your app for me. |
Well, definitely I don't know what is happening... Uhmm could be the way how SideKick build the app 🤔 |
I set
preferGoogleMaps: true,
in iOS options but it doesnt open Google Maps App (Google Maps is installed) instead it opens iOS Maps App.Maybe I am wrong, help me please :D
PD: Only when I set an array in
to:
it opens Google Maps with way points (I think this is because open the web url)The text was updated successfully, but these errors were encountered: