Skip to main content
Question

“import Purchases” or “import RevenueCat” in SwiftUI

  • Sep 25, 2023 12:44 PM UTC
  • 2 replies
  • 443 views

Forum|alt.badge.img+2

In the doc “Using RevenueCat with SwiftUI”, https://www.revenuecat.com/docs/swiftui-helpers, they use “import Purchases” all other places in the support documentation “import RevenueCat” is used. Should I shift to “import Purchases”?

This post has been closed for comments

2 replies

Forum|alt.badge.img+8
  • RevenueCat Staff
  • Sep 29, 2023 11:34 PM UTC

Hi, this depends on what version of our SDK you are using. If you are using earlier than version 4, use `import Purchases`. If version 4 and later, you should use `import RevenueCat`


Forum|alt.badge.img+2
  • New Member
  • Jan 26, 2024 8:59 PM UTC

Hi, this depends on what version of our SDK you are using. If you are using earlier than version 4, use `import Purchases`. If version 4 and later, you should use `import RevenueCat`

Will the documentation page be updated to reflect this changed? I figured out the change to the import statement by guessing, and then found this post.

If someone (like me) is following the instructions step by step, it’s easy to miss that the Xcode 15 instructions are slightly different from what’s presented in the video.

https://www.revenuecat.com/docs/ios

A tweak to that documentation should make this straightforward to other users.

Up to this point I’ve had few problems with configuration, setup, and installation.