Flutter: Display log in release mode in iOS

Viewed 1903

I'm trying to display logs in release mode in iOS to test my in App Purchases...

I tried print() & log() but nothing works

Fun fact, it works in Android.

Do you know how to do that?

Thank you

1 Answers

I had the exact same problem! I was also testing in-app purchases on an iOS physical device and could not see the logs in Android Studio. I have tried the print() method, the flutter default logger, and also the logger package.

You have to switch to Xcode and do the following steps:

  1. Open Xcode
  2. In the menu bar, go to Product > Scheme > Edit Scheme...

enter image description here

  1. Make sure Run is selected on the left sidebar
  2. In Build Configuration, change from Debug to Release

enter image description here

  1. Compile your app in Xcode by pressing the "Play"/Run button and it should work

Credits: https://stackoverflow.com/a/61975751/5734066

Related