In my app, I am trying to use Purchases.setAttibutes() to capture user settings and store them in Firestore. I had hoped that the attributes would appear in a document generated by the Firebase RevenueCat extension, but the attributes do not appear. Is this possible? If not, where are these attributes actually stored?
Hi,
Subscriber attributes are stored on RevenueCat servers (https://www.revenuecat.com/docs/subscriber-attributes).
Our Firebase extension does not currently send subscriber attributes to Firestore, but you could retrieve them by calling our /subscribers api endpoint with your secret api key in Firebase.
Ryan,
Thanks for the response. After further exploration, I was successful in having attributes appear in the Firestore event document using the RevenueCat Firebase Extension. Basically, I watched the RevenueCat Flutter In-app subscription video 3 or 4 times and captured the steps below. While I tried this before, I must have missed a step between the app, RevenueCat and App Store Connect.
Here are the setup steps that got it working for me…
Install the magic weather app
open ios/Runner.xcworkspace
- Create a unique bundle id
Build and run
In RevenueCat,
- create a project
- Create an entitlement
- premium
- Create an iOS app
- Name it
- Add bundle id
In App Store Connect,
- Create an app
- In app information, select App-Specific Shared Secret / Manage
- Copy the secret
In RevenueCat,
- Set the secret
- Click Save Changes
- Under API Keys, click ’Show key’ and copy the key
In the app constants.dart file, paste the key
In App Store Connect, select Subscriptions
- Add a subscription group
- Add a subscription
- Specify the subscription duration
- Add another subscription
- Specify the subscription duration
In RevenueCat, select Products
- Add new products
- Add products to the existing entitlement
- Create a default offering (this will appear in the paywall to show the available products)
- Add the packages
- Attach the products
Re-run the app
Bill
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.