is there any phone support - I spend a day trying with both cocoa and swift package manager - nothing seems to work.
cant get revenue cat installed
), could you tell us more about the problems you’re facing?
![Shipped It Badge](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/00177be5-17f2-4400-bea7-87c75adea50f_thumb.png)
I managed to install using swift package manager. The problem I have now is tutorials seem out of date - the updates have deprecated “Purchases.shared.products([productID!])” to Purchases.shared.getProducts” but now the Purchases.shared.purchaseProduct does not accept SKProduct type and can’t convert to StoreProduct type.
Is there a conversion call OR is there another version of Purchases.shared to use with StoreProduct type.
I’m happy to update any documentation that we own, could you provide us links to the things that are out of date?
As for purchasing:
Purchases.shared.getProducts
returns StoreProducts, so the objects returned from there should be the ones you pass in to Purchases.shared.purchaseProduct
![Shipped It Badge](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/00177be5-17f2-4400-bea7-87c75adea50f_thumb.png)
This simple code generates a conversion “error Cannot convert value of type 'StoreProduct' to expected argument type 'SKProduct' “
Purchases.shared.getProducts([productID!]) { (products) in
if !products.isEmpty {
let skProduct = products[0]
print("SkProduct \(skProduct)")
Purchases.shared.purchaseProduct(skProduct) { (transaction , purchaserInfo, error, userCancelled) in
if error == nil && !userCancelled {
successfulPurchase()
}
}
Ohh, I see, my bad.
The new method that takes in a StoreProduct is actually this one:
Purchases.shared.purchase(product: storeProduct)
, not Purchases.shared.purchaseProduct: skProduct)
.
I realize that this is confusing, I apologize.
![Shipped It Badge](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/00177be5-17f2-4400-bea7-87c75adea50f_thumb.png)
Thanks Andy, big help - I think its just getting started that’s hard.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.