iOS
Unable to display "console.log()" messages in iOS applications after having upgrade to XCode 9. However, the messages are being displayed in Android.
I am creating the template app with "tns create hello --ng" and adding a constructor method to the app.component.ts file and including the command "console.log("Hello!")" but no console.log messages are being displayed in the Terminal screen.
Any assistance is appreciated. Thanks.
I can confirm the problem, same app stopped displaying console log after the update to XCode 9, I was on 3.2.0 and I tried to update to 3.2.1 but the problem persisted.
If the app is started from XCode everything is displayed correctly in the the XCode console.
Hi @shivapersad @stefalda,
I was able to reproduce this issue only on iOS 11 and the console.log seems to work as expected on older iOS versions. The problem is reproducible also on non-Angular project.
I am attaching sample project, which could be used for debugging.
Archive.zip
@tsonevn Thanks for confirming the issue with iOS 11. As a workaround @triniwiz suggested I use "tns debug ios" and go to "Console" in Nativescript Inspector which displays the "console.log()" messages there.
Hopefully a fix is on the way for this bug so we can return to using "tns run ios". I am presently downloading an iOS 10 Simulator as well so I can ease my debugging effort until a fix is prepared.
@sebawita and I have confirmed this as a bug, looking for a patch possibly? thanks
@shivapersad can confirm switching to ios 10.3 simulator worked for me.
hi, team, this is a pain in everyone's rear, can we get a fix date on this please? Or a patch?
Just a FYI: there is a workaround; see my blog http://fluentreports.com/blog/?p=545
This issue was moved to NativeScript/ios-runtime#800
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@tsonevn Thanks for confirming the issue with iOS 11. As a workaround @triniwiz suggested I use "tns debug ios" and go to "Console" in Nativescript Inspector which displays the "console.log()" messages there.
Hopefully a fix is on the way for this bug so we can return to using "tns run ios". I am presently downloading an iOS 10 Simulator as well so I can ease my debugging effort until a fix is prepared.