9

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

fartem
  • 2,361
  • 2
  • 8
  • 20
Naografix
  • 847
  • 2
  • 15
  • 35
  • [logger package](https://pub.dev/packages/logger) which I am also personally using logs in release mode but I would not recommend to debug in release mode because DevTools work unreliably :) – soft_and_ware Jan 27 '21 at 14:48
  • @NiklasvonHaxthausen logger package does not print any logs in release on ios – IulianT Nov 26 '21 at 13:43

1 Answers1

9

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

Dharman
  • 30,962
  • 25
  • 85
  • 135
Alex
  • 221
  • 3
  • 11