launch

Launch a live campaign in your app and show the assigned paywall

NamiCampaignManager.launch()

Launch a campaign with the specified label

NamiCampaignManager.launch(label: String)

Parameters

  • label - a string matching the label set in the Control Center

Launch a campaign with a result callback

This can be used to know if the launch succeeded or failed to raise a paywall. Additionally, you can use this to monitor for purchase change events to observe what the outcomes of any system purchase flows initiated from the campaign launch.

NamiCampaignManager.launch(label: "a_label", launchHandler: { success, error in
   // callback with success (bool) or error (LaunchCampaignError)               
})

Launch a campaign with paywall interaction callback

Use this to monitor user interactions with the paywall raised by this campaign launch. Returns NamiPaywallAction events and an optional skuId if relevant to the action.

NamiCampaignManager.launch(label: label, launchHandler: { success, error in
        print("campaign launch - success \(success) or error \(error)")
    },
        paywallActionHandler: { paywallEvent in

            print("Campaign paywallActionHandler metadata: \n" +
                "campaignId: \(String(describing: paywallEvent.campaignId))\n" +
                "campaignName: \(String(describing: paywallEvent.campaignName))\n" +
                "campaignType: \(String(describing: paywallEvent.campaignType))\n" +
                "campaignLabel: \(String(describing: paywallEvent.campaignLabel))\n" +
                "campaignUrl: \(String(describing: paywallEvent.campaignUrl))\n" +
                "paywallId: \(String(describing: paywallEvent.paywallId))\n" +
                "paywallName: \(String(describing: paywallEvent.paywallName))\n" +
                "segmentId: \(String(describing: paywallEvent.segmentId))\n" +
                "externalSegmentId: \(String(describing: paywallEvent.externalSegmentId))\n" +
                "paywallLaunchContext: \(String(describing: paywallEvent.paywallLaunchContext))\n" +
                "deeplinkUrl: \(String(describing: paywallEvent.deeplinkUrl))\n")

    })

Last updated