Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase spamming purchase report logs

At app launch the console is spammed with logs of form :

4.8.1 - [Firebase/Analytics][***********] Purchase is a duplicate and will not be reported. Product ID: ...

I am working with auto-renewable subscriptions and am getting aprox 35 of these at launch. Version of Xcode : 9.2 , Version of Firebase : 3.17.4

How can this be fixed ?

like image 395
Stormsyders Avatar asked Dec 18 '22 01:12

Stormsyders


2 Answers

You can set the logger level to minimum with the following code:

FirebaseConfiguration.shared().setLoggerLevel(.min)
FirebaseApp.configure()
like image 148
Papershine Avatar answered Jan 03 '23 20:01

Papershine


According to the release note (https://firebase.google.com/support/release-notes/ios), the new In-App Purchase report was released on 4.0.7 and it improved the report. The reason you see the log is that there have been duplicate transactions and Analytics will not report those duplicate transactions to avoid inflating the life-time value. Since you are in sandbox, auto-renewable subscriptions are more frequent than in released app (and it could be annoying if you turn on debug mode) but it is necessary if something happens with your report like missing IAP events and you report the problem to Firebase support.

like image 44
adbitx Avatar answered Jan 03 '23 19:01

adbitx