static func availableOfferingWithIdentifier(_ id: String) -> Offering{
Purchases.shared.getOfferings { offering, error in
if let offerMatchingID = offering!.offering(identifier: id){
return offerMatchingID
}
}
}
Trying to display a Paywall for my offering with an identifier. produces error
![](https://uploads-us-west-2.insided.com/revenuecat-en/attachment/4fad934c-876a-48de-996f-c565dcbeff32.png)
why doesn't the closure “offering” realise it’s own type?