Closed pyretttt closed 1 year ago
Hi, @pyretttt! If you have created any paywall using our dashboard, then you have to use products from paywalls. Also you need to call logShowPaywall
before making purchase. We had to add this check to make sure there were no errors in the analytics calculations.
Speaking of workaround, you can try to remove the paywalls and use only products, although I don't think this approach is effective.
Yep thanks, but next it crashing on Adapty.swift:369 if hasPaywalls && product.variationId == nil { assertionFailure("[Adapty] In order to properly measure performance of the paywalls, you need to use products from paywalls. https://docs.adapty.io/docs/ios-displaying-products#showcase") }
You should pass the ProductModel
object from the corresponding PaywallModel
object (products
property). In case you are using paywalls, you shouldn't use the raw products array.
Yep, I do it like that. I noticed that one day it crashed, but on next day it didn't. It seems danger and poorly designed. Because I hadn't even changed anything between this days, it just started to work properly. Won't it repeat on production? If it can - would you describe me, what is the reason product doesn't have variationId?
Asserts are designed to be executed in debug builds only. We have added this checks to be sure, developers makes everything in a right way at the development stage.
It is working fine in release build, but yes crashed for me in debug build. Calling logShowPayWall
has fixed it.
Environment: flutter: 3.0.5 iOS: 15.5
Adapty/Adapty.swift:369: Fatal error: [Adapty] In order to properly measure performance of the paywalls, you need to use products from paywalls. https://docs.adapty.io/docs/ios-displaying-products#showcase
Crashing on call: final result = await Adapty.makePurchase(product);
How manual purchase is related to paywalls? Is there a workaround?