Mopub iOS Wrapper

From POKKT DOCUMENTATION
(Redirected from Mopub iOS wrapper)
Jump to: navigation, search

Common Steps for MoPub Pokkt Wrapper

Last Update: 21st September, 2017

Download Latest Version MoPub Wrapper.

Download Latest Version MoPub Wrapper for Unity.


Step 1: Getting Started

The following instructions assume you are already familiar with the MoPub Mediation Network and have already integrated the MoPub SDK into your application. Otherwise, please start by reading the following articles for a walk-through explanation of what mediation is, how to use the MoPub Mediation UI, and instructions on how to add MoPub mediation code into your app.


Step 2: Adding Your Application to Your Pokkt Publisher's Account

  • Create Account and log-in at https://www.pokkt.com
  • Add your application and get its application Id and Security key.

Step 3: Integrating the MoPub Mediation Adapter

  • Add PokktSDK.framework to your XCode project and link to it.
  • Add PokktMoPubCustomInterstitial , PokktMoPubCustomBanner and PokktMoPubRewardedVideo to your Xcode project.
  • In the Build Settings of XCode add -ObjC to “Other Linker Flags”.
  • Your Project needs to have following frameworks to use PokktSDK.
    • CoreData.framework
    • Foundation.framework
    • MediaPlayer.framework
    • SystemConfiguration.framework
    • UIKit.framework
    • CoreTelephony.framework
    • EventKit.framework
    • AdSupport.framework
    • CoreGraphics.framework
    • CoreMotion.framework
    • MessageUI.framework
    • EventKitUI.framework
    • CoreLocation.framework
    • AVFoundation.framework
    • libc++.tbd

Step 4: Adding a Custom Event

  1. Sign in to your MoPub account at https://app.mopub.com/account/login/
  2. Click Add a network under Networks tab.

    Mopub network andr.jpg

  3. Click Custom Native Network and set up the inventory against your app.

    Mopub custom net andr.jpg

  4. Provide the following details:
    • Custom Event Class: Enter the name of the custom event class.
      • For Rewarded Video: Enter PokktMoPubCustomRewardedVideo
      • For Interstitial: Enter PokktMoPubCustomInterstitial
      • For Banner: Enter PokktMoPubCustomBanner
    • Title: Enter the name for the custom event. This is used in reporting and cannot be changed later.
    • Custom Event Class Data: Enter a JSON string as follows:

      {
      "POKKT_SCREEN_NAME":"Screen Created on Pokkt Dashboard",
      "POKKT_APP_ID":"Pokkt App Id",
      "POKKT_SEC_KEY":"Pokkt App Security Key",
      "POKKT_THIRD_PARTY_USERID":"Unique user id as in your app",
      "POKKT_REWARD_NAME":"Virtual currency As per your App",
      "POKKT_DEBUG":true/false
      }
  5. Click Save Section.
  6. Open Global segment and enable the newly created Ad Network against the ad units of you app.

    Mopub segment ios.jpg

Step 5: Testing your application

Congratulation - that's it! You may now run your app and see Pokkt ads in action.