Flutter Onesignal release mode not working

Hello, I am developing applications with flutter. I installed the Onesignal SDK. I made the adjustments as stated in the document and started onesignal in the main.dart file.

However, while onesignal is running in debug mode, release mode does not work. In debug mode, I can get variables such as player_id and the user can subscribe. These operations do not work in release mode. Can you help me?

I am not sure why this would be happening, would have to see some error logs. You can so 2 things:

  1. Run the app in release mode using the command flutter run --release, carefully check the logs for any errors.
  2. Install apk on device, connect device to your pc, and view device logs using adb logcat command and run your app. Carefully look for flutter related errors as there may be a lot of meta data.

Do share here if you find any particular error :slight_smile:

1 Like

Thank you for the answer. I can say that I gave up because I have been dealing with this problem for a few days :joy: I decided to use Firebase Cloud Message service instead of Onesignal. I tried it now and it worked without any problems. I think I can close the topic, have a nice day.


Yes, FCM works flawlessly :slight_smile:

I have the same problem…