Jeffrey’s Newsletter

Share this post

The missing piece in integrating RevenueCat, Firebase, and Flutter

jeffreybunn.substack.com

The missing piece in integrating RevenueCat, Firebase, and Flutter

Jeffrey Bunn
Jul 3, 2022
Share this post

The missing piece in integrating RevenueCat, Firebase, and Flutter

jeffreybunn.substack.com

💡 Update: Firebase Analytics' Flutter plugin now exposes firebaseAppInstanceId. PR here.

The missing piece in integrating RevenueCat, Firebase, and Flutter

RevenueCat's latest integration with Firebase significantly improved their already invaluable service.

We use both services in Clearful, and this integration immediately gave us several key benefits:

  1. More granular subscription events to be used in our A/B testing.

  2. Querying subscription data became faster and more accessible.

  3. It allowed us to more easily create subscription lifecycle events such as a free trial ending push notification, among others.

When following the integration documentation, however, I learned that the firebaseAppInstanceId property hasn't yet been exposed by the Firebase team in the Flutter/Firebase Analytics plugin.

I briefly considered writing a Flutter plugin myself to grab the firebaseAppInstanceId from Firebase Analytics' iOS and Android plugins, but thankfully common sense prevailed, and I first decided to search and see if anyone else had already done this. And voila! Enter firebase_instance_id - a simple plugin that does precisely what I needed and nothing else.

Once I found this plugin, setting firebaseAppInstanceId as a subscriber attribute in RevenueCat was simple:

Share this post

The missing piece in integrating RevenueCat, Firebase, and Flutter

jeffreybunn.substack.com
Comments
TopNew

No posts

Ready for more?

© 2023 Jeffrey Bunn
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing