Documentation is not up to date

  • 24 August 2022
  • 1 reply
  • 27 views

Badge +5

Hello, 

If you get the error : 
TypeError: _reactNativePurchases.default.setup is not a function

The getting started for RN is not up to date.
The Purchases.setup("public_ios_sdk_key") is no more available.
https://docs.revenuecat.com/docs/getting-started#7-configure-the-sdk
You should use Purchases.configure({ apiKey: "public_ios_sdk_key" }) instead.
https://docs.revenuecat.com/docs/configuring-sdk#initialization


1 reply

Userlevel 5
Badge +7

Thanks @Quentin D! We released the new version v5.0.0 of react-native-purchases yesterday, which changed the name of this method, and the docs weren’t updated yet. Thanks for letting us know, it should all be fixed now!

Reply