Solved

import Purchases not showing up in xCode

  • 24 September 2021
  • 2 replies
  • 433 views

Badge +2

Hi there,

I’m new to developing and I’m trying to implement the purchases SDK for ioS. I’m using xCode and Swift UI.

I’ve followed all the steps, I’ve installed via CocoaPods and I can see the Pod.xcodeproj in my xc file. Everything builds successfully. However when I try and use the import Purchase it just says there is No Such module ‘Purchase’. 

I’ve added In-App Purchase as a capability. 

In the tutorial I’ve followed it just worked and I’m at a loss as to what to try. 

Thanks

Chris

icon

Best answer by cody 27 September 2021, 16:21

View original

2 replies

Userlevel 6
Badge +8

Hey @Christopher Bailey! 👋

Can you confirm which version of the Purchases SDK you are using? Starting with version 4.0.0 (currently in beta), you’ll want to call `import RevenueCat` as the module name has changed.

If you don’t want to upgrade to the beta, you can continue using version 3.x (3.12.4 is the latest on iOS as of this post) which will allow for importing `Purchases` instead of `RevenueCat`.

 

Badge

Thanks @cody 
Sadly this wasted lot my time looking around the community for the fix. 

I really wish you have updated your docs after making such breaking change. 
https://docs.revenuecat.com/docs/swiftui-app-lifecycle

 

 

Reply