Monetizr Developer Hub

Welcome to the Monetizr developer hub. Here you will find user documentation and our API reference guide to get you started.

Get Started    API Reference

iOS Plugin Setup

Follow the steps in this section to set up and start using Monetizr's SDK for iOS.

Requires iOS version 10.0+

Installation

You can install Monetizr plugin via CocoaPods or manually from Github.

CocoaPods install
Add Monetizr to your Podfile in Xcode project.

pod 'Monetizr', '~> 3.2'

Run the install command.

pod install

This will download and install the plugin with dependencies.

To make sure you have the latest version you can use update command.

pod update 'Monetizr'

Manual install
Find the plugin on Github. Copy "Monetizr-SDK" folder to your project and resolve dependencies.

Using the plugin

Import "Monetizr" to your project:

import Monetizr

Use the public test token "4D2E54389EB489966658DDD83E2D1" and in applicationDidFinishLaunching(_:) do the initialization:

Monetizr.shared.token = "4D2E54389EB489966658DDD83E2D1"

Now you can test connection with getProductForTag and test value "Sample shirt". Show default reward view:

Monetizr.shared.getProductForTag(tag: Sample shirt, presenter: UIViewController?, presentationStyle: UIModalPresentationStyle?) { success, error, product in ()}

You can customize reward view settings. If you choose to show product in a view provided in plugin you should provide presenter view and presentation style. Without presentation style it will default to UIModalPresentationStyle.overCurrentContext.

If everything works you can login to Monetizr Console and retrieve access token for your specific app. That will allow to work with your custom products and applets.

iOS Plugin Setup


Follow the steps in this section to set up and start using Monetizr's SDK for iOS.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.