dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

Support for Cabify App #155

Closed pedrohills closed 6 years ago

pedrohills commented 7 years ago

Please add support for Cabify app in iOS and Android platforms.

The link details can be found at:

http://developers.cabify.com/#mobile-deeplink

Thanks.

dpa99c commented 7 years ago

@pedrohills this has been implemented on the dev branch, but the iOS implementation is failing to launch the Cabify app using the documented URL scheme (see the issue above).

dpa99c commented 7 years ago

Implemented and published uk.co.workingedge.phonegap.plugin.launchnavigator@4.0.6. Note the iOS URL scheme is still not working as of Cabify app v6.3.3

emyymk commented 6 years ago

Hi, i need Cabify support on IOS. Please, is it possible to see if the iOS URL scheme has been implemented on this new version (Cabify app is v7.1.5)?

dpa99c commented 6 years ago

Just tested Cabify v7.1.4 for iOS (latest available in App Store) and the issue remains the same: calling the cabify:// URL scheme does not launch the app.

In testing this, I realised I'd forgotten to add the native iOS constants for Cabify and Baidu Maps which meant the apps were always being reported as not installed: I've just published a patch version - 4.1.4 - which fixes this.

So you can now test this yourself, for example using the example project and see that the correct native URL is called but the Cabify app does not respond to it.

dpa99c commented 6 years ago

After emailing the dev contact address at Cabify, they responded that the new iOS URL scheme has not yet been updated in the official documentation, but included this in their email. I'll test this and see if it works.

URL name example
cabify:///journey{?json} Start Reservation cabify:///journey?json=%7B%22vehicle_type%22:%22c52ce29f50438491f8d6e55d5259dd40%22,%22stops%22:%5B%7B%22loc%22:%7B%22latitude%22:40.4491,%22longitude%22:-3.6708%7D,%20%22name%22:%22Goiko%20Grill%22%7D,%7B%22loc%22:%7B%22latitude%22:40.4497,%22longitude%22:-3.6712%7D%7D%5D%7D Open Journey on builder 2. Show origin, destination and vehicle selected.json={ "vehicle_type":"c52ce29f50438491f8d6e55d5259dd40", "stops":[ { "loc":{ "latitude":36.5163851, "longitude":-6.2999767 }, "name":"Goiko Grill" }, { "loc":{ "latitude":40.697, "longitude":-3.90257262140512 } } ]}
cabify:///journey{id} Open Active Journey
cabify:///journey/reservation/{id} Open a Reservation
cabify:///journeys/previous Previous Journeys Screen
cabify:///journeys/previous/{id} Previous Journey Detail
cabify:///promotions Promotions
cabify:///promotions{?promocode} Apply promo code
cabify:///locations Locations
cabify:///location/{id} Location detail
cabify:///preferences Journey Preferences
cabify:///payment_methods Payment Methods
cabify:///profile Profile
cabify:///help Help
cabify:///invite_your_friends Invite Friends
cabify:///journey/reservations Open reservation screen
\
cabify:///contact Open contact screen
cabify:///delivery Open delivery screen
cabify:///free_rides Open free rides screen
cabify:///glovo Open Glovo screen
cabify:///newsfeed Open newsfeed screen
cabify:///pricing Open pricing screen
cabify:///profile" Open profile screen
dpa99c commented 6 years ago

The above data structure is actually identical to the documentation and hence still doesn't work with the latest version of the iOS app. However, I've received the following email from Cabify so I will anticipate that the next release of Cabify iOS will fix the URL scheme:

Alfonso Rocha alfonso.rocha@cabify.com 6 March 2018 at 10:06 Hello Dave,

Thanks for reporting this. We've seen this issue, fixed it and we will push to production soon the new version.

We're sorry for the problems it may caused to you and your userbase.

Cheers,

Cabify - Your private Driver
Alfonso Rocha Product Manager

alfonso.rocha@cabify.com +34 684 25 69 52

pedrohills commented 6 years ago

I am very happy to hear this feedback.

dpa99c commented 6 years ago

FYI I just tested Cabify v7.1.5 for iOS (released yesterday, March 8) and it still does not launch when the URL scheme is invoked.

This was the URL which the plugin constructed:

cabify://cabify/journey?json={"stops":[{"loc":{"longitude":"-5.982372","latitude":"37.388140"},"name":"Seville"},{"loc":{"longitude":"-3.701690","latitude":"40.434233"},"name":"Madrid"}]}

Also tried the documented example URL, but also no launch:

cabify://cabify/journey?json={"vehicle_type":"c52ce29f50438491f8d6e55d5259dd40","stops":[{"loc":{"latitude":40.3979288915956,"longitude":-3.70257262140512 },"name":"Goiko%20Grill"},{"loc":{"latitude":40.697,"longitude":-3.90257262140512}}]}
dpa99c commented 6 years ago

Published in v4.2.0

emyymk commented 6 years ago

Thank you, dpa99c. Working fine on IOS.