Public protocols

Once the user tap on an icon - callback

func onItemClick(url: String) {}

Error handling

func sdkFailure(error: SDKError) {}
// interface
public enum SDKError: Error {
    case sdkNotInitialized
    case missingClientInfoAndUserData
    case missingClientId
    case failToInitSDK
    case failToAuthenticate
    case failToGenerateToken
    case failToGetUserStatus
}

ViewController presented on host application

func presented(viewController: UIViewController) {}

Selecting items callback

 func didSelectItems(fromController controller: QuizViewController, quizObject: WSQuiz, selectedOptions: [WSQuizAnswer], lastSelectedOption: WSQuizAnswer) {
            
 }

screen selection is done- callback

func screenSelectionDone(fromController controller: QuizViewController, quizObject: WSQuiz, selectedOptions: [WSQuizAnswer]) {
        
    }

No new messages to read - callback

// callback will be called once message queue (user read all messages inside)
func onReadMessages(unreadMessage: Int) {}

Last updated