[ 
https://issues.apache.org/jira/browse/CB-8947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546854#comment-14546854
 ] 

jcesarmobile commented on CB-8947:
----------------------------------

And what do you expect to happen when you pass a JSON object instead of a 
string?

>From the doc:
Shows a custom alert or dialog box. Most Cordova implementations use a native 
dialog box for this feature, but some platforms use the browser's alert 
function, which is typically less customizable.

navigator.notification.alert(message, alertCallback, [title], [buttonName])
    message: Dialog message. (String)
    alertCallback: Callback to invoke when alert dialog is dismissed. (Function)
    title: Dialog title. (String) (Optional, defaults to Alert)
    buttonName: Button name. (String) (Optional, defaults to OK)

I don't see any bug here, you are using it in the wrong way, you should pass a 
String, not a JSON object

If you want to show a JSON object on an alert, you can convert it to string 
first with JSON.stringify(error);


> alert() crashes when passing a JSON object on iOS
> -------------------------------------------------
>
>                 Key: CB-8947
>                 URL: https://issues.apache.org/jira/browse/CB-8947
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Dialogs
>    Affects Versions: 4.0.0
>         Environment: Notifications Plugin version 0.3.0
>            Reporter: Dennis Patzer
>            Assignee: Shazron Abdullah
>            Priority: Critical
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> In the error handler of a geolocation retrieval I had alert(error); which 
> crashes, because I passed an object into the function call. This shouldn't 
> happen.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to