iOS SDK

IMGA SDK supports multiple methods for installing the library in a project.

Installation with CocoaPods

To integrate IMGA SDK into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'IMGASDK', :git => '[email protected]:2CodersStudio/2CodersFrameworkPod.git', :tag => '0.1'

Requirements

IMGA SDK requires iOS 12 and xCode 12.4

Usage

Creating an instance

 let imga = IMGASDK(logLevel: .debug)

Initialising the SDK (launch)

Launching the SDK with raw data

let eventCentreData:IMGAData = [
            "operator": "[OPERATOR-NAME]",
            "sport": "ufc",
            "targetModule": "full",
            "eventId": "269",
            "language": "en",
            "version": "latest",
            "initialContext" : [
                "view": "matchup",,
            "targetElementSelector": "#img-arena-event-centre",
            "options":["videoPlaybackEnabled": "false"]
        ]
//Launch with the event centre data
try? imga.launch(with: eventCentreData) { imgaView in
    if let newView = imgaView {
        //Do something with the imgaView
    }
}

Launching the SDK with IMGAEventCentreParams object

Launching the SDK and append the IMGA View to a container

Subscribing to status changes

Subscribing to new messages

There are several types of messages/topics

  • CONTEXT_UPDATE: Topic for covering general UI state updates, for example navigation changes or the user selecting a player in the UI.

  • HANDSHAKE_FAILED: Topic to signify the handshake between Event Centre and your site failed to complete.

Stop the SDK

IMGA SDK is owned and maintained by the IMGA Development team.

Last updated

Was this helpful?