Solved

How can my merge my existing projects so they can chare subscriptions?

  • 10 December 2021
  • 4 replies
  • 174 views

Badge +4

Really exciting news about the new subscription sharing between apps feature.

I had already set this up using RevenueCat and some custom server and client side code to enable users to access their subscriptions across multiple apps.

Now that our apps have been auto migrated to projects, I’d like to have them all exist as one project with several apps. Is there a process to do this? In my specific case, I have 2x iOS and 1x macOS app, each with their own subscriptions at identical prices with my custom logic unlocking the entitlements across the apps when users sign in. It would be much easier to have RevenueCat handle this.

Thanks in advance!

icon

Best answer by cody 10 December 2021, 19:13

View original

4 replies

Userlevel 6
Badge +8

Hey @JoeAllen!

We don’t have an automated process for this, but you should be able to follow the same steps for transferring apps between accounts and doing a client side migration here:

 

Basically, you’ll need to create new apps in your main project for your other apps. You’ll then want to configure the new apps to be the same as the projects you’re migrating from (don’t forget bundle ID, shared secret, entitlements/products, etc).

From the SDK, you’ll want to call syncPurchases on launch for apps launching the new version (with the new API key) so their receipt can be synced with the new app. You shouldn’t call this on launch every time, so make sure you are checking if the user actually exists in the new app first (on iOS, checking PurchaserInfo for originalApplicationVersion is a good way to see if a receipt has been synced).

Let me know if that helps!

Badge +4

Thanks! To clarify, should I check that any value exists for originalApplicationVersion to verify that the user exists? Or should I validate that the version is (or isn’t) later than this particular update?

Userlevel 6
Badge +8

Hey @JoeAllen!

I’d recommend just checking if the value exists- if no value exists when you fetch PurchaserInfo, then you can assume they’ve never had their receipt synced with this new app.

Additionally, syncPurchases is silent, and will return the new PurchaserInfo after syncing their transactions.

Does that make sense?

 

Badge +4

Yes that makes perfect sense thank you!

Reply