Skip to main content
Answer

import Purchases not showing up in xCode

  • September 24, 2021
  • 2 replies
  • 575 views

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

Best answer by cody

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`.

 

This post has been closed for comments

2 replies

cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • Answer
  • September 27, 2021

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`.

 


Forum|alt.badge.img
  • New Member
  • June 10, 2022

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