Don't deprecate purchaseProduct

  • 24 January 2024
  • 1 reply
  • 29 views

Badge +2

purchaseProduct is now deprecated. Please don’t remove it.

The first reason is that it is the most simple solution to buy a product. You just need one line of code and the identifier string (no object like the other solutions). It could also be the first starting point for beginners, so they don’t have to learn stuff they don’t need. E. g.:

  1. Learn purchaseProduct
  2. Do you have often changing products or need more data about a product? Now learn getProducts + purchaseStoreProduct
  3. You need to switch between product bundles (e. g. A/B Tests)? Use getOfferings+purchasePackage
  4. You need even more? Paywalls…

The second reason is that any other solution then purchaseProduct requires always to connect to RevenueCat to fetch the products/packages/offerings etc. This is bad for GDPR, because it's most of the time not requested by the user (tracking)


1 reply

Userlevel 3
Badge +8

Hi!

We don’t have any plans to remove purchase product, but as it is deprecated, we won’t be doing future development on it.

The reason we are deprecating it is because using a string is fragile, and could break on either the SDK- or store-side. So we would prefer developers to need to write an additional line to fetch an object rather than risk purchases breaking in production.

Reply