Hey @Jymd !
So, every user of your app is a customer tracked by an App User ID
- either anonymous (auto-generated by the SDK on first launch)
- or identified (whatever you pass to
Purchases.logIn()).
There's always one as you can't have a user without one in RevenueCat:
Customers are referenced by an identifier called an App User ID, which is used as a source of truth for the subscription status of the customer across different devices and platforms.
more context here
So when your Android user buys anonymously and you then call logIn("user_123"), the anonymous customer is aliased into user_123. Same on iOS. Both subs end up under the same user_123 customer, which is the intended design:
A user logged into the same App User ID on different platforms will be considered the same user and can access the entitlements they have purchased on any platform.
more context here
This is how cross-platform entitlement is meant to work. Worth flagging that the link isn't the email itself, it's whatever user_id you pass to logIn() (which we recommend being a UUID or identifier other than email):
Don't set emails as App User IDs
For the above reasons about guessability, and GDPR compliance, we don't recommend using email addresses as App User IDs.
more context here
Which way to go depends on what you want for your users.
For sharing across platforms (the common case, where users pay once and have premium on every device they log into), identify the user in RevenueCat at sign-up / login before gating on premium. Then purchases happen under the identified ID from the start, no anonymous-then-alias behavior, and the cross-platform behavior just works out of the box. Also, your iOS users who already paid on Android wouldn't see the paywall a second time.
For isolated platforms (less common, but definitely valid), the platform-prefix idea would work. The same customer in your system would map to two separate RevenueCat customers (ios_user_123 and android_user_123), and they'd pay separately on each platform. Just be aware most users who own multiple devices could be unhappy paying twice, and it tends to generate refund requests, but as long as you frame it like so it should work indeed.
But most subscription apps go with the first since it matches what users expect across devices.