You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/27 19:27:04 UTC

[jira] [Commented] (CB-12376) IOS log issues

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

ASF subversion and git services commented on CB-12376:
------------------------------------------------------

Commit eeb48e8ad8c1cac2f7650f3a2d59f10da970a6c3 in cordova-plugin-device's branch refs/heads/master from filmaj
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-device.git;h=eeb48e8 ]

CB-12376 Updated version and RELEASENOTES.md for release 1.1.6 (via coho)


> IOS log issues
> --------------
>
>                 Key: CB-12376
>                 URL: https://issues.apache.org/jira/browse/CB-12376
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 6.4.0
>         Environment: macOS Sierra 10.12.2
> Xcode 8.2.1
>            Reporter: Sami Silmani
>
> Logging in ios doesn't work event after adding the plugin cordova-plugin-console
> steps to reproduce the bug:
> {code}
> cordova create myApp com.cordova.myApp
> cd myApp/
> cordova plugin add cordova-plugin-console
> cd www
> vi js/index.js 
> cordova emulate ios
> {code}
> in index.js i added 3 console.logs only the on device ready and Received Event are displayed on the xcode console log, all the others on the index.js and the code added later doesn't work, the log works fine on android.
> {code:title=index.js|borderStyle=solid}
> console.log("starting log");
> var app = {
>     // Application Constructor
>     initialize: function() {
>         document.addEventListener('deviceready', this.onDeviceReady.bind(this), false);
>         console.log("init function");
>     },
>     // deviceready Event Handler
>     //
>     // Bind any cordova events here. Common events are:
>     // 'pause', 'resume', etc.
>     onDeviceReady: function() {
>         this.receivedEvent('deviceready');
>         console.log("on device ready");
>     },
>     // Update DOM on a Received Event
>     receivedEvent: function(id) {
>         var parentElement = document.getElementById(id);
>         var listeningElement = parentElement.querySelector('.listening');
>         var receivedElement = parentElement.querySelector('.received');
>         listeningElement.setAttribute('style', 'display:none;');
>         receivedElement.setAttribute('style', 'display:block;');
>         console.log('Received Event: ' + id);
>     }
> };
> app.initialize();
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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