Kebechet/Maui.RevenueCat.InAppBilling

Add Offering metadata

Closed this issue · 1 comments

RevenueCat offers the possibility to add JSON metadata to offerings, as described here. This data can then be accessed, for example in Swift like so:

let offerings = try await Purchases.shared.offerings()
if let offering = offerings?.current {
    let paywallTitle = offering.getMetadataValue(for: "title", default: "Get Pro")
    let paywallSubtitle = offering.getMetadataValue(for: "subtitle", default: "Unlock all the features")
    let paywallButton = offering.getMetadataValue(for: "button", default: "Redeem Trial")
}

It would be great to add something like GetMetadataValue(string name, string default) of OfferingDto in this library.

Released as:
https://www.nuget.org/packages/Kebechet.Maui.RevenueCat.InAppBilling/4.1.0

Once again thank you @varyamereon for the contribution !