Skip to content
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

Fail to launch google map app even if comgooglemaps is included in LSApplicationQueriesSchemes #1450

Open
3 tasks
75341704 opened this issue Jul 20, 2024 · 3 comments
Labels
info-needed Further information is requested Stale/2024 Stales issues (as of around 2024-08)

Comments

@75341704
Copy link

Bug Report

Problem

In the info.plist, it includes hereunder,
<key>LSApplicationQueriesSchemes</key> <array> ... <string>comgooglemaps</string> ... </array>

window.location.href="comgooglemaps://?saddr=28,120&daddr=31,121&directionsmode=driving";
The message "Failed to load webpage with error: unsupported URL" was in Xcode and it failed to launch google map app.

But I copied "comgooglemaps://?saddr=28,120&daddr=31,121&directionsmode=driving" and pasted it in safari.
It works.( It notify us whether the google map app shall be launched or not. if ok, the google map app is launched...)

Any further settings are required?

What is expected to happen?

window.location.href="comgooglemaps://?saddr=28,120&daddr=31,121&directionsmode=driving";
and launch the google map app

What does actually happen?

Information

Command or Code

Environment, Platform, Device

IPHONE 12
ios 17.5.1

Version information

9.0.0 (cordova-lib@9.0.1)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@jcesarmobile
Copy link
Member

Did you add an allow-intent tag in your config.xml?
https://cordova.apache.org/docs/en/latest/config_ref/index.html#allow-intent

@jcesarmobile jcesarmobile added the info-needed Further information is requested label Jul 29, 2024
@75341704
Copy link
Author

@jcesarmobile
The config.xml snapshot is hereunder
image

@dpogue
Copy link
Member

dpogue commented Aug 15, 2024

The behaviour for launching other apps from URLs is complicated and inconsistent. I suspect this might be due to trying to open it via JavaScript with window.location.href.

@75341704 Out of curiosity, if you add a link to your app with the Google Maps URL and tap it, does it launch the map app properly?
Something like this:

<a href="comgooglemaps://?saddr=28,120&daddr=31,121&directionsmode=driving">Test link to open map</a>

@dpogue dpogue added the Stale/2024 Stales issues (as of around 2024-08) label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Further information is requested Stale/2024 Stales issues (as of around 2024-08)
Projects
None yet
Development

No branches or pull requests

3 participants