I’m using the apphud sdk to fetch in app purchase products. The SDK is used to purchase products in an IOS app. I use the following code
Apphud.paywallsDidLoadCallback { paywalls in
if let paywall = paywalls.first(where: { $0.identifier == "your_paywall_id" }) {
I get the following error
Cannot pass function of type '([ApphudPaywall]) async -> Void' to parameter expecting synchronous function type
paywallsDidLoadCallback is defined as
@MainActor
@objc public static func paywallsDidLoadCallback(_ callback: @escaping ([ApphudPaywall]) -> Void) {
ApphudInternal.shared.performWhenOfferingsReady {
callback(ApphudInternal.shared.paywalls)
}
}
is this because the apphud sdk does not support async/await? Since this is a third party sdk, is there a quick fix? Please help!