Solved

createAlias() API removed from RC SDK 5.0

  • 5 March 2022
  • 1 reply
  • 31 views

Badge +6

On the Github page it seems the createAlias() function will be removed from RC SDK 5.0.

Why? We use this function in our app to let users restore their purchase when switching phones or accounts. Without this function we would need to do this manually for every user via email customer support. Ofcourse this does not scale.

Is there a alternative to createAlias() in the 5.0 SDK? 

icon

Best answer by sharif 7 March 2022, 21:04

View original

1 reply

Userlevel 5
Badge +9

RevenueCat will still alias users when calling restoreTransactions if you’re still on the legacy alias behavior, which is independent of the createAlias SDK function.

If you’re calling createAlias to identify users, take a look at the new logIn/logOut behavior to see if it fits your use case. It tries to intelligently alias users as needed so you don’t have to call createAlias manually. We found that createAlias is a difficult function to use properly, so we’re building in more guardrails to reduce the chance a small developer error could result in issues in a production app.

If you still need createAlias while you look into these guides, you can stay on v4.x of the SDK for a while. We try to support older versions of the SDK because there are many apps still using them in production, so you don’t have to upgrade any time soon if you’re still trying to figure out an upgrade path. We’ll also provide additional documentation as the new versions roll out to help you out with this.

Reply