Skip to main content

Documentation is not up to date

  • August 24, 2022
  • 1 reply
  • 39 views

Forum|alt.badge.img+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

This post has been closed for comments

1 reply

Jens
RevenueCat Staff
Forum|alt.badge.img+7
  • RevenueCat Staff
  • August 24, 2022

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!