I am attempting to transform my swift IOS code to make use of async/await. I am calling the perform
let consequence = await Apphud.buy(productId)
however I am getting the error
Can not convert worth of kind ‘String’ to anticipated argument kind ‘ApphudProduct’ after I construct.
I discover that the Apphud SDK has a perform buy(productId) the place it takes a string (which I want) however that is deprecated.
This is the perform from the apphud sdk
@MainActor @objc(purchaseById:callback:)
public static func buy(_ productId: String, callback: ((ApphudPurchaseResult) -> Void)?) {
ApphudInternal.shared.buy(productId: productId, product: nil, validate: true, callback: callback)
}
Can somebody please assist?