Bisko iOS SDK

Version: 1.0.39

This service allows you to add Bisko to your iOS application. This section of the documentation provides detailed steps on how to succesfully complete this task.

Requirements

Item

Notes

Xcode 9.0+

Download and install Xcode.

iOS 10.0+

The iOS operating system needs to be newer than 10.0.

Adding the Bisko SDK

The preferred method of installation is by using CocoaPods. You need to add the following code snippet to your Podfile:

  pod 'BiskoSDK', :source => 'https://gjirafadev@dev.azure.com/gjirafadev/GjirafaSpecs/_git/GjirafaSpecs'

Then, run the following command:

  pod install

To ensure that you have the latest version (1.0.28) of the SDK, run this command:

  pod update 'BiskoSDK'

Setup

  1. Import BiskoSDK in your class where you are using Bisko

      import BiskoSDK
    
      #import <BiskoSDK/BiskoSDK.h>
    
  2. Call the Bisko.init()

      //Initiation code for applications developed in swift
        Bisko.init(propertyId: BISKO_PROPERTY_ID)
    
      //Initiation code for applications developed in objective C
        [[Bisko alloc] initWithPropertyId:BISKO_PROPERTY_ID];
    

    Additionally you can send extra data which can be used to identify a user within different applications. For example, you can send additional IDs, or other user properties such as gender, age, group etc.

          // Initiation code with user information for applications developed in swift
        Bisko.init(propertyId: BISKO_PROPERTY_ID, userId: "USER_ID_HERE", userProperties: ["Gender":"Female"])
    
          // Initiation code with user information for applications developed in swift
        [[Bisko alloc] initWithPropertyId: BISKO_PROPERTY_ID userId: "USER_ID_HERE" userProperties: userProperties];
    

As seen from the samples above the init() function expects five parameters:

PARAMETER

DATATYPE

REQUIRED

DESCRIPTION

propertyId

INTEGER

TRUE

The identification number of you property created within your organization.

userId

STRING

FALSE

The user identifier within your website.

userProperties

[STRING:STRING]

FALSE

Extra user properties that you want to be added to the collected data.

Event collection

In order to collect standard events in your application using Bisko, you must invoke the Bisko.event() function.

The simplest implementation of Bisko event collection can be as follows:

  // Swift
Bisko.event(eventType: "contentView")
  // Objective C
[Bisko eventWithEventType:@"contentView"];

Since the event name is a string, you can send any text that covers your needs:

  Bisko.event(eventType: "read")
Bisko.event(eventType: "view")
Bisko.event(eventType: "search")
Bisko.event(eventType: "play")
  // Objective C
[Bisko eventWithEventType:@"read"];
[Bisko eventWithEventType:@"view"];
[Bisko eventWithEventType:@"search"];
[Bisko eventWithEventType:@"play"];
IMPORTANTThe SDK must be initiated before you start collecting the events.

Event parameters

Standard events support properties, which allow you to include an object containing additional information about an event, such as ID, name, type, description etc.

The predefined properties that can be collected for the content where the event happened are:

PROPERTY

DATATYPE

DESCRIPTION

Id

STRING

The identifier of the content.

Name

STRING

The name of the content.

Type

STRING

Type of content, i.e. "video", "news article".

Description

STRING

Description of the content.

Category

ARRAY

A string array of the content categories.

ImageUrl

STRING

The url of the main image of the content.

Value

STRING

Value of content, i.e. for ecommerce "100 $".

Keywords

ARRAY

A string array of keywords related to the content.

Author

STRING

The author of the content.

Quantity

INTEGER

Quantity of the content.

All these properties are optional, so not sending any of them does not pose a problem.

In addition to the predefined properties mentioned above, custom properties that seem relevant to the event can be added to the content object.

IMPORTANTAll custom properties must be of type string