Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  17] [ 1]  / answers: 1 / hits: 21747  / 11 Years ago, thu, july 18, 2013, 12:00:00

With a fresh download of Cordova 2.9 and the Cordova CLI, I created Hello World application via the CLI. I also added the iOS platform via the CLI. Looking in the index.js file (within www/js), there is a javascript object which contains the function that fires onDeviceReady, and a function inside it, which contains a console.log which should output Received Event: deviceready.



After running this app from Xcode in the iOS 6.1 simulator, there is no output from the console.log in Xcode's debug console. I looked at the cordova.js file and noticed the CLI platform add utility added 3.0 (ran this yesterday, before the 3.0 release), but I tried running the app with cordova-2.9.0.js as well.



Anyway, I haven't been able to get a console.log in my own application or the Hello World app to display in Xcode's console with cordova 2.9 or 3. My Xcode console is set to All Output. Is this an error with the release? From all the googling I've been doing, it seems Cordova has had on and off support of console.log depending on the version and I don't know where it's supposed to be now. Thanks for your help.


More From » ios

 Answers
2

The console functionality is now implemented as a plugin, which you need to manually add to your project:



$ cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git

[#76890] Wednesday, July 17, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nadiatristinl

Total Points: 151
Total Questions: 116
Total Answers: 108

Location: Japan
Member since Tue, Jul 26, 2022
2 Years ago
nadiatristinl questions
Tue, Mar 15, 22, 00:00, 2 Years ago
Wed, Dec 29, 21, 00:00, 2 Years ago
Thu, Dec 17, 20, 00:00, 4 Years ago
Sat, Jul 11, 20, 00:00, 4 Years ago
Wed, Apr 29, 20, 00:00, 4 Years ago
;