Unity3d iOS

From POKKT DOCUMENTATION
Jump to: navigation, search

UnityAd Pokkt Mediation

Last Update: 21st September, 2017


Pokkt SDK version used: 6.2

UnityAd SDK version used: 2.1.1


Download Latest Version Pokkt Mediation.


  1. Common Steps for UnityAds Pokkt Mediation:This is common documentation which is useful for all plugin.
  2. Xamarin: Integration:Check the Steps Mentioned for Xamarin.
  3. AIR Integration:Check the Steps Mentioned for AIR
  4. Marmalade Integration:Check the Steps Mentioned for Marmalade
  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 UnityAds Pokkt Mediation

Prerequisites


Step 1: Configure Pokkt Dashboard

  • Create Account at https://www.pokkt.com
  • Register your App here and do the required setting according and if there is any confusion please take help of given documents by UnityAd.
  • Update UnityAd ad network setting in Pokkt dashboard like below:
    Unity ios.jpg

  • 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 “UnityAdsNetwork” (you can simply copy-paste it without the quotes).
  • Game Id (required):Login to UnityAd developer dashboard and “select Game option->Add New Game-> open created App then copy Game Id from here.
  • Reward Amount (required):Provide reward value which user will get after the watching reward ad.
  • 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):Here need to provide Placement name. First please create placement namein Pokkt dashboard which will reflect here as screen name and same will map with placement name so same will have to provide here. Now create placement in UnityAd dashboard. Once App has been created then choose monetization settings -> Advanced Settings -> Add new ad placement -> choose option either Videoor Rewarded videoas per your need and provide placement name here. Please follow below screen shot to create screen name in Pokkt dashboard.



Step 2 : Configuration in Application

  • Download the mediation project from POKKT and it is recommended to use the same class file UnityAdsin your project. And if you want to do some changes please do those changes in same file.
  • Add the UnityAds.framework and UnityAds.bundle from a Finder window to your project’s Xcode window.. Make sure to update your project's dependencies accordingly.
  • You also need to include StoreKit.framework, AdSupport.framework and CoreTelephony.framework to your project to compile the project.

Xamarin iOS

Please follow the below steps to integrate Mediation in Xamarin iOS project:

  1. Copy downloaded file libUnityAdsExtension.a in your project folder.
  2. Open project option by right click on your project and select “iOS Build” from left pane and then add the libUnityAdsExtension.a details and required framework of UnityAds inside “Additional mtouch arguments” like below. This is working so you can try with this also.
  3. -gcc_flags "-F${ProjectDir} -framework UnityAds -framework CFNetwork -framework CoreGraphics -framework AudioToolbox -framework CoreLocation -framework EventKitUI - framework MessageUI -framework Security -framework Social -framework MobileCoreServices -framework WebKit -weak_framework StoreKit -L${ProjectDir} - lUnityAdsExtension -force_load ${ProjectDir}/libUnityAdsExtension.a"
  4. Add CFNetwork framework inside project folder also if needed.
  5. Follow above all process to complete integration.

AIR iOS

Follow the below steps to integrate Mediation in AIR iOS project:

  1. Add downloaded file UnityMediation_iOS.ane in your project.
  2. Download UnityAd ANE from below link and add this one in your project. This is just a suggestion to use this as we have tested with this but you can use your own ane.
    https://github.com/Heyzap/unityads-ane/releases
  3. PFollow above all process to complete integration and also check our given example specially app.xml file.

Marmalade iOS

Follow the below steps to integrate Mediation in Marmalade iOS project:

  1. Check downloaded file which has libUnityAdsExtension.a” and this need to be added in your main project .mkb file like below:
    • iphone-link-lib='UnityAdsExtension'
    • iphone-link-libdir=‘$CWD’
    • And UnityAds framework (which you need to download from UnityAds support site) also need to be added like below under deployment section and also need to add required frameworks:
    • iphone-link-opts="-F$CWD -framework UnityAds”
    • And please add required frameworks for this. You can check our given sample app.
  2. Add UnityAds resource bundle file in data folder.
  3. If you see error related to CFNetwork framework not found then please add CFNetwork framework in your project folder and update .mkb file like below:

    iphone-link-opts="-F$CWD -framework CFNetwork”

  4. Follow above all process to complete integration and also check our given example.