dpa99c / phonegap-launch-navigator

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

Crashes app when used #156

Closed sean-hill closed 7 years ago

sean-hill commented 7 years ago

Hey there,

In my emulator this plugin works like a boss, however on my device it crashes with this error:

<Notice>: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIAlertController can only have one action with a style of UIAlertActionStyleCancel'

Any ideas?

dpa99c commented 7 years ago

UIAlertController can only have one action with a style of UIAlertActionStyleCancel

That error is occurring due to cordova-plugin-actionsheet, on which this plugin has a dependency in order to display the list of apps to the user. A possible cause is a conflict with another plugin in your project which also defines an action with the UIAlertActionStyleCancel style.

A possible solution is to uninstall/re-install this plugin - see #139. Or you could implement a custom UI to choose the navigator app (as demonstrated in the Advanced Example), therefore eliminating the need to invoke cordova-plugin-actionsheet.

You can confirm this plugin works OK in isolation by building+running the example projects.

dpa99c commented 7 years ago

Closed due to no response from OP