cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Coleman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-11635) Passing object to navigator.notification.alert crashes iOS app
Date Thu, 28 Jul 2016 03:43:20 GMT

     [ https://issues.apache.org/jira/browse/CB-11635?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Don Coleman updated CB-11635:
-----------------------------
    Description: 
Create  new project

    $ cordova create foo
    $ cd foo
    $ cordova plugin add cordova-plugin-dialogs
    $ cordova platform add ios

Edit www/js/index.js and replace onDeviceReady with 

    onDeviceReady: function() {
        app.receivedEvent('deviceready');

        // this crashes the app on iOS
        var dictionary = { error: 'notification plugin is expecting a string'};
        navigator.notification.alert(dictionary);
    },

Run the app

    $ cordova run ios

RESULT: This crashed the app on a device and on the simulator
EXPECTED RESULT: String or [Object object] in the dialog box or some error

    $ cordova -v
    6.3.0
    $ cordova platform ls
    Installed platforms:
      ios 4.2.0
    $ cordova plugin list
    cordova-plugin-dialogs 1.2.1 "Notification"
    cordova-plugin-whitelist 1.2.2 "Whitelist"



> Passing object to navigator.notification.alert crashes iOS app
> --------------------------------------------------------------
>
>                 Key: CB-11635
>                 URL: https://issues.apache.org/jira/browse/CB-11635
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Dialogs
>    Affects Versions: 6.3.0
>            Reporter: Don Coleman
>
> Create  new project
>     $ cordova create foo
>     $ cd foo
>     $ cordova plugin add cordova-plugin-dialogs
>     $ cordova platform add ios
> Edit www/js/index.js and replace onDeviceReady with 
>     onDeviceReady: function() {
>         app.receivedEvent('deviceready');
>         // this crashes the app on iOS
>         var dictionary = { error: 'notification plugin is expecting a string'};
>         navigator.notification.alert(dictionary);
>     },
> Run the app
>     $ cordova run ios
> RESULT: This crashed the app on a device and on the simulator
> EXPECTED RESULT: String or [Object object] in the dialog box or some error
>     $ cordova -v
>     6.3.0
>     $ cordova platform ls
>     Installed platforms:
>       ios 4.2.0
>     $ cordova plugin list
>     cordova-plugin-dialogs 1.2.1 "Notification"
>     cordova-plugin-whitelist 1.2.2 "Whitelist"



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message