Last month I installed RevenueCat via Swift Packages in one of my SwiftUI apps and everything was working great until today when I tried to install a new package (Firebase) and I ran into issues installing it. I’m not 100% but I think my issue with RevenueCat started when I accidentally clicked on the `Update to Latest Package Versions` in Xcode. After that I started seeing a message that said something like…
Dependencies could not be resolved because no versions of 'purchases-ios' match the requirement 4.0.0..<5.0.0 and root depends on 'purchases-ios' 4.0.0..<5.0.0.
Then I removed the RevenueCat package and reinstalled the version suggested in the documentation (3.12.6 < 5.0.0, I actually used 3.12.6 < 4.0.0 since I could’t change it to < 5.0.0), after this new version I started getting errors within my code, for instance I’m getting the following error message…
import RevenueCat
Purchases.shared.restoreTransactions { (purchaserInfo, error) in
// code here
}
'restoreTransactions(completion:)' has been renamed to 'restorePurchases(completion:)'
Replace 'restoreTransactions' with 'restorePurchases'
FYI - My Code hasn’t change since first day:
At this point I’m very confused, based on the migration guide the newest API should be `restorePurchases`, but… I’m using version 3.12.6 which I believe is the old Purchases framework.
My question at this point is, based on the above code and if someone had to guess, what version was I using before the issues? Please note that I have been using `import RevenueCat` and `restoreTransactions` method since the first day.
Or in other words, what version should I install that would work with my existing code?
Any help will be appreciated.
Thanks!