dpa99c / react-native-launch-navigator

A React Native module for launching today's most popular navigation/ride apps to navigate to a destination.
143 stars 34 forks source link

Fixed `LaunchNavigator.navigate` never resolving the returned promise when AppleMaps/MapKit is used on iOS #10

Closed IjzerenHein closed 5 years ago

IjzerenHein commented 5 years ago

The promise returned from LaunchNavigator.navigate never resolved when using MapKit on iOS. This made it impossible/unreliable to test for errors. This PR fixes that issue by implementing a completion handler, much in the same way the schema launch operations are handled.

PR Type

What kind of change does this PR introduce?

PR Checklist

For bug fixes / features, please check if your PR fulfills the following requirements:

What is the purpose of this PR?

Does this PR introduce a breaking change?

What testing has been done on the changes in the PR?

It has been verified that the promise returned from LaunchNavigator.navigate not successfully resolves using provider id LaunchNavigator.APP.APPLE_MAPS and launchMode LaunchNavigator.LAUNCH_MODE.MAPKIT.

dpa99c commented 5 years ago

Thanks. The changes are obvious and logical so will merge this straight in.

IjzerenHein commented 5 years ago

Sweet!

Great library btw, kudos! 👍 👍