javascript - console.log is not working in iOS Phonegap App even after adding the console plugin -


I created a phonegap iOS app in Cordoba CLI. I've added the console plugin and yes the device is called successfully but console.log is not working and does not print anything in the XCode log.

Plugin installation: -

Cordova-V
3.3.1-0.3.1

add sudo cordova plug-in org.apache.cordova.console
Plugin is using the plugin "org.apache.cordova.console" through the registry - "org.apache Is starting to install .cordova.console "for IOS
Preparation of the iOS project - org.apache.cordova.console is installed on IOS.

Sudo Cordova plugins
['org.apache.cordova.console', 'org.apache.cordova.device', 'org' .apache.cordova. Dialogs ',
' org.apache.cordova.geolocation ',
' org.apache.cordova.globalization ',
' org.apache.cordova.inappbrowser ',
' Org.apache. Cordova.media ',
' org.apache.cordova.network- notification ',
' org.apache.cordova.splashscreen ',
' org.apache.cordova.vibration ']

Javascript: -

  var app = {start: function () {this.bindEvents (); }, Bind Aventus: function () {document.addEventListener ('deviceready', this.onDeviceReady, false); }, OnDeviceReady: function () {app.receivedEvent ('deviceready'); }, Receive event: function (id) {console.log ('device ready'); // This warning is not working ("Applied Tools"); // it is working}};    

I have resolved this problem by doing these steps < P> Step 1:

I'm just copying a copy from a Cordova project where console.log was working

  sudo cp -r DIFF_CORDOVA_PROJECT_PATH / Platform / iOS /www/plugins/org.apache.cordova.console CURRENT_CORDOVA_PROJECT_PATH / Platform / iOS / www / plugins /   

Step 2:

module Exports add code CURRENT_CORDOVA_PROJECT_PATH / Platform / iOS / www / cordova_plugins.js file under JSON Array

  { "file": "plugins / org.apache.cordova.console / www / Console Via "logger.js", "id": "org.apache.cordova.console.console", "clobbers": ["console"]}, {"file": "plugins / org.apache.cordova. console / www / logger. JS "," id ":" Orgkapachekcordovakconsoleklogger "," Clobers ": [" Cordowaklogr "]}   

Step 3:

add the meta data on the same cordova_plugins.js file Modul.aksportkmad Eta JSON Array: -

"org.apache.cordova .console ":" 0.2.7 "

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -