CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

KwizzadSDK 2.4.3

KwizzadSDK 2.4.3

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2019
SPMSupports SPM

Maintained by Fares Ben Hamouda, TVSMILES Jenkins.



  • By
  • Kwizzad Team

Kwizzad SDK for iOS

Pod version Carthage compatible Github Release

Showcase

Showcase

Prerequisites

  • You already have your own KWIZZAD API KEY and PLACEMENT ID. If not, please contact TVSMILES per E-Mail and we will register your APP.
  • Apps integrating KWIZZAD SDK require at least iOS 8.0.
  • A fully working examples (objective-c and swift) can be found at: Examples

Migration

Migration guide from versions < 2.x.x

Installation

How to integrate KwizzadSDK Kwizzad supports Swift and ObjectiveC, and provides packages for CocoaPods and Carthage.

Carthage

Carthage is a dependency manager for Cocoa. To install Carthage, please consult the documentation.

To load the Kwizzad SDK over Carthage:

  • Put a Cartfile into your project. Contents:

    github "kwizzad/kwizzad-ios" "master"
    

    You can replace master by a specific version number you want to stick to, for example 2.0.0.

  • Run carthage checkout

    CocoaPods

CocoaPods is also a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To load the Kwizzad SDK over CocoaPods:

  • Integrate KwizzadSDK into your Xcode project using CocoaPods by specifying this in your Podfile:
    source 'https://github.com/CocoaPods/Specs.git'
    use_frameworks!
    
    target '<Your Target Name>' do
        pod 'KwizzadSDK'
        # Alternatively, if you want to stick to a specific Kwizzad SDK version:
        # pod 'KwizzadSDK', '<version number goes here>'
    end
  • Run the following command in your terminal, in the root directory of your project:
    $ pod install

Usage:

step 1 : Initializing the SDK

  • with swift
     KwizzadSDK.setup(apiKey: "YOUR_API_TOKEN_HERE"")```
    
  • with objective-c
    [KwizzadSDK setupWithApiKey:@"YOUR_API_TOKEN_HERE"];

step 2 : Assigning Kwizzad Delegate protocol

  • with swift

    import KwizzadSDK
    class ViewController: UIViewController, KwizzadSDKDelegate {
       override func viewDidLoad() {
          KwizzadSDK.instance.delegate = self
        }
    }
  • with objective-c

    @interface ViewController () <KwizzadSDKDelegate>
    @end
    
    @implementation ViewController
    - (void)viewDidLoad {
     KwizzadSDK.instance.delegate = self;
    }

step 3 : Requesting Ad

  • with swift

    KwizzadSDK.instance.requestAd(placementId: YOUR_PLACEMENT)
  • with objective-c

    [KwizzadSDK.instance requestAdWithPlacementId:YOUR_PLACEMENT onAdAvailable:nil];

step 4 : Implement the delegate functions

Please have a look at the KwizzadExample app project. There are two build schemes, one for Swift, one for objective-c, to implement the delegate functions.

 using the delegate pattern

    Mandatory callbacks :

    - kwizzadDidRequestAd:placementId
    - kwizzadOnAdAvailable:placementId:potentialRewards:adResponse
    - kwizzadOnAdReady:placementId
    - kwizzadDidShowAd:placementId
    - kwizzadGotOpenTransactions:openTransactions
    - kwizzadDidDismissAd:placementId
    - kwizzadOnNoFill:placementId

    Optionals Callbacks :

    - kwizzadOnErrorOccured:placementId:reason
    - kwizzadWillPresentAd:placementId
    - kwizzadOnGoalReached:placementId
    - kwizzadCallToActionClicked:placementId

For better targeting, please set your user data :

let userData = kwizzad.userDataModel;
userData.userId = "12345" 
userData.gender = Gender.Female
userData.userName = "Francesca Rossi" 
userData.facebookUserId = "1234abc"