Native iOS logs not showing in Flutter project

Viewed 1095

In my Flutter project, I call native Android code and native iOS code.

From my native Android code, I use Log.i("tag", "my log") to log anything I want, and it appears in both the Logcat and the Flutter console.

Now, I want to do the same from my native iOS code. I tried:

print("my log")
NSLog("my log")

but nothing appears anywhere, neither in the Xcode console nor in the Flutter console, which is really annoying when it comes to debugging...

Also, I run my app on an iOS emulator.

So how can I see the log from the native iOS code?

Thanks.

1 Answers

If you build flutter project in Xcode. print or NSLog you will get the expected output in Xcode console.

enter image description here

If you build flutter project in android studio or vs code, you perform print or NSLog in Xcode will not get you expected output. I‘ve tried.

Maybe this url will help you, but i am not sure.

Related