InMobi iOS

From POKKT DOCUMENTATION
Jump to: navigation, search

InMobi Pokkt Mediation

Last Update: 21st September, 2017


Pokkt SDK version used: 6.7

InMobi SDK version used: 7.0.0


Download Latest Version Pokkt Mediation.


  1. Common Steps for InMobi Pokkt Mediation:This is common documentation which is useful for all plugin.
  2. Xamarin Integration: There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  3. AIR Integration: There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  4. Marmalade Integration: There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  5. ShiVa Integration:There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  6. Cocos2d-x Integration:There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  7. Unity3D Integration:There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.
  8. Titanium Integration:There is no separate documentation needed, once you have exported the Xcode project, use the steps mentioned for Native integration.

Common Steps for InMobi Pokkt Mediation

Prerequisites


Step 1: Configure Pokkt Dashboard

  • Create Account at https://www.pokkt.com
  • Register your property in InMobi account/dashboard.
    InMobi ios.jpg

  • Go to the Monetize tab and click the spanner icon next to your property. Your Placement ID is displayed. Copy this value and use it in the integration code.
  • Class Name (required):This is the class name that you define inside your application to set up the network. Classname for the network can be set during SDK integration. If you are using Pokkt’s default adaptors for mediation, then class name will be “InmobiNetwork” (you can simply copy-paste it without the quotes).
  • Coins (required):Provide reward value which user will get after the watching ad. This is the same value which you provide in InMobi dashboard.
  • Account Id (required):Login to InMobi developer dashboard and get the account id from account settings.
  • Placement Id (required):Create new app and then create placement for rewarded ad. Once placement has been created then you will get placement id from there. Same Id will have to pass it from code also as screen name.
  • Interstitial Placement Id (required):Create new app and then create placement for interstitial. Once placement has been created then you will get placement id from there. Same Id will have to pass it from code also as screen name.
  • ECPM (required):Put your expected value of ECPM which will in turn rank this network in comparison to other configured networks.
    Screen ios.jpg

  • Screens (required):You need to provide placement idfor rewarded ad or non rewarded interstitial ad but for that you need to create placement(Screen name) in Pokkt dashboard. So once you create screen name in Pokkt dashboard same will reflect here. Now get the placement Id for rewarded or interstitial ad. Create new app in InMobi dashboard and then create placement for rewarded/interstitial. Once placement has been created then you will get placement id. Same Id will have to pass here in screen name according to rewarded or interstitial. Please follow the below screen shot for creating screen name in Pokkt dashboard.

Step 2: Configuration in Application

  • Copy the following header files and binary from the downloaded Inmobi SDK bundle to your project.

    - libInMobi-5.x.x.a

    - IMSdk.h

    - IMBanner.h

    - IMBannerDelegate.h

    - IMInterstitial.h

    - IMInterstitialDelegate.h

    - IMNative.h

    - IMNativeDelegate.h

    - IMCustomNative.h

    - IMRequestStatus.h

    - IMCommonConstants.h

  • Make sure the following frameworks are added to your Xcode project:

    - AdSupport.framework

    - AudioToolbox.framework

    - AVFoundation.framework

    - CoreLocation.framework

    - CoreTelephony.framework

    - EventKit.framework

    - EventKitUI.framework

    - MediaPlayer.framework

    - MessageUI.framework

    - Security.framework

    - Social.framework

    - StoreKit.framework

    - SystemConfiguration.framework

    - UIKit.framework

    - SafariServices.framework

    - libsqlite3.0.dylib

    - libc++.dylib

  • Note: Set NSLocationWhenInUseUsageDescription flag to YES in your info.plist file.

Code changes

  • Create a class which implements Pokkt’s AdNetwork interface.
  • This class should also implement InMobi Callback protocol IMInterstitialDelegate
  • Pokkt SDK’s PokktNetworkDelegate methods should be mapped from your newly created class methods.

    - (void)interstitialDidFinishLoading:(IMInterstitial *)interstitial

    - (void)interstitial:(IMInterstitial *)interstitial didFailToLoadWithError: (IMRequestStatus *)error

    - (void)interstitial:(IMInterstitial *)interstitial didFailToPresentWithError: (IMRequestStatus *)error

    - (void)interstitialWillPresent:(IMInterstitial *)interstitial

    - (void)interstitialDidPresent:(IMInterstitial *)interstitial

    - (void)interstitialWillDismiss:(IMInterstitial *)interstitial

    - (void)interstitialDidDismiss:(IMInterstitial *)interstitial

    - (void)userWillLeaveApplicationFromInterstitial:(IMInterstitial *)interstitial

    - (void)interstitial:(IMInterstitial *)interstitial rewardActionCompletedWithRewards: (NSDictionary *)rewards

    - (void)interstitial:(IMInterstitial *)interstitial didInteractWithParams:(NSDictionary *)params

  • Sample implementation of this class in included in release. InMobiNetwork.h and InmobiNetwork.m
  • Now the last part, please declare this class name in your Pokkt account Dashboard.