Mobile iOS SDK
The VeriShow SDK aims to provide text and video chat functionality to native iOSapps.
The VeriShow SDK aims to provide text and video chat functionality to native iOSapps.
The SDK contains two separated modules:
The combination of the two modules provides full text and video chat capabilities to an iOS native application.
This document describes how to integrate the two modules inside a native application.
The custom frameworks can be downloaded from:
self.vsSocket=[[VerishowSessionSocketIO alloc] init ]; UIWindow *window = [UIApplication sharedApplication].keyWindow; UIViewController *rootViewController = window.rootViewController; [self.vsSocket initVerishow:@"https://platform.verishow.com" aac:@"1244723128644" applictionContainer:rootViewController.view]; [self.vsSocket startVisit];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(agentAvailable:) name:@"VerishowSession.agentAvailable" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(agentUnAvailable:) name:@"VerishowSession.agentUnAvailable" object:nil];
When an agent is available, a visitor can engage the agent by clicking on the live help button.
When an agent is not available an alert can be shown that no agents are available at the present.
When agent is available (see above) and the visitor clicks the live help button, a call can be established by adding the following:
[self.vsSocket createVerishowConnection]; [self.vsSocket makeTheCall];
When there is a need to add video chat capabilities to an existing text chat, the audio video object should be initialized when the chat starts. When the chat starts a notification event is fired, which holds the room number information for initializing the audio/video object as follows:
VeriShow can be configured to limit the ability of the customer to participate with audio/video depending on the business requirement.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(verishowSessionStarted:) name:@"VerishowSession.chatStarted" object:nil]; -(void)verishowSessionStarted:(NSNotification*)notification{ NSString* roomNumber=[notification userInfo][@"1"]; [self startVerishowAudioVideo:roomNumber]; } -(void)startVerishowAudioVideo:(NSString*)roomNmuber{ NSLog(@"started startVerishowAudioVideo,roomNmuber = %@",roomNmuber); self.localVideoContainer=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 140, 190)]; self.remoteVideoContainer=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 360, 240)]; BOOL autoStartAv=NO;//wXh NSString* signallingServerURL=@"rtc.verishow.com"; BOOL useDefaultAVControls=YES; if(self.verishowAv==nil) { self.verishowAv=[[VerishowAudioVideo alloc] initilizeVerishowVideo]; } // Once createConnection is called a permission request for audio video will popup to the user. self.verishowAv createConnection:autoStartAv roomName:roomNmuber signalingServerUrl:signallingServerURL localVideoView:self.localVideoContainer remoteVideoView:self.remoteVideoContainer AVContainerView:self.view useDefaultAvControlButtons:useDefaultAVControls]; }
Notification Name | Indicates that |
VerishowAudioVideo.agentConnectedEvent | The agent started audio/video |
VerishowAudioVideo.disconnectedFirewall | There is a an audio/video server connection error due to firewall restrictions. |
VerishowAudioVideo.connectionLost | A connection was established but got lost. |
VerishowAudioVideo.agentStoppedAudioVideo | The agent has stopped his/her audio/video. |
VerishowAudioVideo.cannotCaptureAudioVideoDevice | The audio video device was inaccessible. |
Notification Name | Indicates that |
VerishowSession.agentAvailable | The agent is available to take calls |
VerishowSession.agentUnAvailable | The agent is unavailable to take calls |
VerishowSession.chatStarted | The text chat started |
The sample application holds a simple example on how to add a “live help button” and make a call to an agent.
When testing, please make sure to update the AAC to the one provided by your VeriShow account manager.
Sample application can be downloaded from:
For assistance with the above SDK, please call 1-855-427-5227 or send an email to [email protected]