A callback the application provides to Nami that is invoked when Nami asks the application to present a paywall.

let paywallProvider :NamiPaywallProvider = { ( fromVC: UIViewController?, products : [NamiMetaProduct]?, developerPaywallID : String, paywallMetadata : NamiMetaPaywall ) in
  // Create your paywall using content data passed in.
}
[NamiPaywallManager registerWithApplicationPaywallProvider:^(UIViewController * _Nullable fromVC, NSArray<NamiMetaProduct *> * _Nullable products, NSString * _Nonnull developerPaywallID, NamiMetaPaywall * _Nonnull paywallMetadata) {
  // Create your paywall using content data passed in.
}];

📘

React Native

Javascript does not have the same concept of a Paywall provider as the native app code. Instead set up an event listener and use the registerWithApplicationPaywallProvider call.

Arguments

  • (optional) fromVC : a UIViewController instance to present from - if null, present the paywall however you choose.
  • (optional) products : an optional array of NamiMetaProducts to present in this paywall, as defined on the Nami server. The paywall products already loaded from StoreKit and ready to use to present correct pricing and display options. It is valid to have a paywall with no products defined.
  • (optional) developerPaywallID : a String instance, although not technically optional the string may be empty if no developer ID has been entered fro it yet.
  • (optional) paywallMetadata : a NamiMetaPaywall instance filled with metadata about the desired paywall from the Nami servers. Of primary interest, this object will hold a pre-loaded UIImage background asset chosen for this paywall.