Native TvOS
Contents
1 Pokkt SDK for tvOS (v4.0) Integration Guide
2 Getting Started with Pokkt SDK v4.0
2.1 Pokkt SDK for tvOS Integration Guide v4.0
2.1.1 Overview
2.2 Project Configuration
2.2.1 Dependencies
2.3 Implementation Steps.
2.3.1 SDK Configuration
2.3.2 Ad Types
2.3.2.1 Video
2.3.2.2 Rewarded
2.3.2.3 Non Rewarded
2.3.3 Ad Delegates
2.3.3.1 Video
2.3.4 OutStream Ads
2.3.5 Pokkt ad player configuration
2.3.6 User Details
2.3.7 Debugging
2.3.8 Analytics
2.3.8.1 Google Analytics
2.3.8.2 Flurry Analytics
2.3.8.3 MixPanel Analytics
2.3.8.4 Fabric Analytics
2.3.9 IAP(In App Purchase)
2.3.10 Limitation
Pokkt SDK for tvOS (v4.0) Integration Guide
Last Update: 11th February, 2019
Download Latest Version Here with PDF Documentation v4.0.
Getting Started with Pokkt SDK v4.0
1. Add "PokktSDK.framework" to your project.
2. Set Application Id and Security Key in Pokkt SDK. You can get it from Pokkt dashboard from your account. These are unique per app registered.
3. Set the following to enable or disable omission of Pokkt logs and other informatory messages. Make sure to set it to false before release.
4. Show Video Ad with one of the followings:
5. Implement [PokktVideoAdsDelegate setPokktVideoAdsDelegate:] to listen to video-ad related messages.
Pokkt SDK for tvOS Integration Guide v4.0
Overview
Thank you for choosing Pokkt SDK for iOS. This document contains all the information required to set up the SDK with your project. Before implementing it is mandatory to go through project configuration and implementation steps , as these sections contain mandatory steps for basic SDK integration.
You can download our SDK from pokkt.com.
In the package downloaded above you will find::
Docs
Contains documentations for step wise step integration for SDK.
PokktAds Demo
Source code for PokktAds Demo(Sample app) which showcase implementation of Pokkt SDK through code for better understanding.
PokktSDK
PokktSDK.framework add in to your project
ScreenName: This one parameter is accepted by almost all API’s of Pokkt SDK. This controls the placement of ads and can be created on Pokkt Dashboard.
We will be referencing PokktAds Demo app provided with SDK during the course of explanation in this document. We suggest you go through the sample app for better understanding.
Project Configuration
Dependencies
Add PokktSDK.framework to your project’s settings at “Build Phases -> Link Binary with Libraries and add the PokktSDK.framework.
Frameworks Required
Info.plist
Add the below exceptions to your application’s info.plist.
Other Settings
Please make sure that your app project has -ObjC set as Other linker flag in Build Settings.
Implementation Steps.
SDK Configuration
1. Set Application Id and Security key in Pokkt SDK. You can get it from Pokkt dashboard from your account. We generally assign unique application Id and Security key.
2. If you are using server to server integration with Pokkt, you can also set Third Party UserId in PokktAds.
3. When your application is under development and if you want to see Pokkt logs and other informatory messages, you can enable it by setting shouldDebug to true . Make sure to disable debugging before release.
Ad Types
Video
Video ad can be rewarded or non-rewarded. You can directly call show for it.
it will stream the video which may lead to buffering delays depending on the network connection.
Rewarded
To show rewarded ad call:
Non Rewarded
To show non-rewarded ad call:
Ad Delegates
Ad actions are optional, but we suggest to implement them as it will help you to keep track of the status of your ad request.
Video
OutStream Ads
OutStream ad will be non-rewarded only.
Ad will play only if Ad is visible in bound, if it is not visible on the screen it will in pause state.
OutStream Ad contain 3 states as Play, Pause & Replay. After completing the video Replay button will be enable.
If You are requesting for full screen ad then you have to destroy OutStream ad.
OutStream Ad allows only for the following format.
ScrollView
Load OutStream Ad Call:
Destroy OutStream Ad Call:
Tableview
Load Ad
Destroy Ad
Pokkt ad player configuration
Pokkt Ad player works the way App is configured at Pokkt dashboard, but we provide a way to override those settings using PokktAdPlayerViewConfig.
Application should prefer configuration provided through code by developer or what’s configured for the app in dashboard, can be controlled any time through the dashboard itself. If you want to make changes to this configuration after your app distribution, you can contact Pokkt Team to do the same for your app through admin console.
Various properties that can be managed through this are:
1. Default skip time Defines the time after which user can skip the Ad. Property name: DefaultSkipTime Values: Any Integer value. Default value is 10 seconds.
2. Should allow skip Defines if user is allowed to skip the Ad or not. Property name: ShouldAllowSkip Values: True = User can skip Ad. False = User can’t skip Ad.
3. Should allow mute Defines if user is allowed to mute the Video Ad or not. Property name: ShouldAllowMute Values: True = User can mute video Ad. False = User can’t mute video Ad.
4. Should confirm skip Defines if confirmation dialog is to be shown before skipping the Ad. Property name: ShouldConfirmSkip Values: True = Confirmation dialog will be shown before skipping the video. False = Confirmation dialog will not be shown before skipping the video.
5. Skip confirmation message Defines what confirmation message to be shown in skip dialog. Property name: SkipConfirmMessage Values: Any String message. Default value is “Skipping this video will earn you NO rewards. Are you sure?”.
6. Affirmative label for skip dialog Defines what should be the label for affirmative button in skip dialog. Property name: SkipConfirmYesLabel Values: Any String message. Default value is “Yes”.
7. Negative label for skip dialog Defines what should be the label for affirmative button in skip dialog. Property name: SkipConfirmNoLabel Values: Any String message. Default value is “No”.
8. Skip timer message Defines message to be shown before enabling skip button. Don’t forget to add placeholder “ ## ” in your custom message. This placeholder is replaced by property “Default skip time” assigned above. Property name: setSkipTimerMessage Values: Any String message. Default value is “You can skip video in ## seconds”
9. Incentive message Defines message to be shown during video progress, that after what time user will be incentivised. Property name: setIncentiveMessage Values: Any String message Default value is “more seconds only for your reward !”
10. Should collect feedback Defines message to be shown during video progress, that after what time user will be incentivised. Property name setShouldCollectFeedback Values: True = If you want to collect feedback from the user for the Ad. False = If you don’t want to collect feedback from the user for the Ad.
User Details
For better targeting of ads you can also provide user details to our SDK using.
Debugging
Other than enabling debugging for Pokkt SDK, it can also be used to:
Analytics
We support various analytics in Pokkt SDK.
Below is mentioned how to enable various analytics with Pokkt SDK.
Google Analytics
Google analytics Id can be obtained from Google dashboard.
Flurry Analytics
Flurry application key can be obtained from Flurry dashboard.
MixPanel Analytics
MixPanel project token can be obtained from MixPanel dashboard.
Fabric Analytics
Analytics Id is not required in case of Fabric.
IAP(In App Purchase)
Call trackIAP to send any In App purchase information to Pokkt.
Limitation
Any web-enabled ad content is not supported, such as MRAID/VPAID/HTML ads etc.
Currently caching for video/images is not possible.
There is no close-button for video, start & end cards.
No mute-button for video ads.
Last updated
