Building the App

Carry out the below steps to build your application by referring to the examples in the right panel.

  1. Import the AssistSDK module into your project.
  2. Generate an SDK token from https://assist.zoho.com/app/settings/integrations/sdk
  3. Initiate a session to generate a session ID. 
  4. Validate and register the SDK token and session ID by using API AssistSession.register.
  5. Create a subclass of AssistSampleHandler and override the  groupID property, allowing you to assign a custom group ID while retaining base functionality.
  6. In the same subclass, use the assist_screenshare_obj instance to control the screen-sharing session (resume, pause, and end). 

 

AssistSession Class

Copiedimport AssistSDK

    /// Registering session id.

    let encapi_token = <your_key>

    /// Get base URL for the session id. If you pass nil then assist.zoho.com will be taken assist.zoho.com. 
    let base_url = AssistScreenShare.get_idc_base_url(for_session: id)!


    AssistScreenShare.register(base_url:base_url, session: id, token: encapi_token, appGroup: "group.your.id", client_name: "client_name"){ (validation) in 
         /// Your code goes
    }

To validate token and session ID use the below API in your main app.

Screenshare class

Copiedimport AssistSDK

class SampleHandler: AssistSampleHandler {
    override var appGroup: String! {
        get {
            return "group.your.id"
        }
        set {}
    }

}

We have introduced AssistSampleHandler class in our SDK and ensure you subsclass this with your SampleHandler class.