Event Delegate
MeetTalk iOS SDK listens to various events on the client app. The event delegate MeetTalkDelegate replaces the usage of TapTalkDelegate from PowerTalk iOS SDK and also contains all the callbacks that TapTalkDelegate has.
All other delegates from PowerTalk SDK can still be implemented normally.
MeetTalkDelegate
MeetTalkDelegate notifies general events from PowerTalk SDK and call/conference related events from MeetTalk SDK.
Not all of the delegate callbacks are required to be handled, but we strongly suggest to override tapTalkRefreshTokenExpired
to handle authentication when the user's session has expired.
Note: Make sure to add #import <MeetTalk/MeetTalk.h>
before registering the delegate
#import <MeetTalk/MeetTalk.h>
@interface AppDelegate() <MeetTalkDelegate, ...>
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[MeetTalk sharedInstance] initWithAppKeyID: ...
}];
[[MeetTalk sharedInstance] setDelegate:self];
}
#pragma mark - Delegate
#pragma mark MeetTalkDelegate
#=============================================================================================
#pragma mark TapTalkDelegate callbacks
#=============================================================================================
- (void)tapTalkRefreshTokenExpired {
// Authentication is needed
}
- (void)tapTalkDidTappedNotificationWithMessage:(TAPMessageModel *_Nonnull)message fromActiveController:(nullable UIViewController *)currentActiveController {
// Handle tapped notification message
}
- (void)userLogout {
// User has finished logging out from TapUI or TapTalk.logoutAndClearAllTapTalkData() process has completed
}
- (void)tapTalkUnreadChatRoomBadgeCountUpdated:(NSInteger)numberOfUnreadRooms {
// Returns number of unread messages from the application
}
- (void)tapTalkDidRequestRemoteNotification {
// Register for remote notification
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
#=============================================================================================
#pragma mark Call/conference notification callbacks
#=============================================================================================
- (void)meetTalkDidReceiveCallInitiatedNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Call Initiated" notification message is received
// Will show incoming call by default if not implemented
}
- (void)meetTalkDidReceiveCallCancelledNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Call Cancelled" notification message is received
}
- (void)meetTalkDidReceiveCallEndedNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Call Ended" notification message is received
}
- (void)meetTalkDidReceiveRecipientAnsweredCallNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Recipient Answered Call" notification message is received
}
- (void)meetTalkDidReceiveRecipientBusyNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Recipient is Busy" notification message is received
}
- (void)meetTalkDidReceiveRecipientRejectedCallNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Recipient Rejected Call" notification message is received
}
- (void)meetTalkDidReceiveRecipientMissedCallNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Recipient Missed Call" notification message is received
}
- (void)meetTalkDidReceiveRecipientUnableToReceiveCallNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Recipient is Unable to Receive Call" notification message is received
}
- (void)meetTalkDidReceiveActiveUserRejectedCallNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Current/Active User Rejected Call" notification message is received
}
- (void)meetTalkDidReceiveParticipantJoinedConferenceNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Participant Joined Conference" notification message is received
}
- (void)meetTalkDidReceiveParticipantLeftConferenceNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Participant Left Conference" notification message is received
}
- (void)meetTalkDidReceiveConferenceInfoUpdatedNotificationMessage:(TAPMessageModel *_Nonnull)message
conferenceInfo:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// A "Conference Info" notification message is received
}
#=============================================================================================
#pragma mark Incoming call callbacks
#=============================================================================================
- (void)meetTalkDidReceiveIncomingCall:(TAPMessageModel *_Nonnull)message {
// A new incoming call is received
}
- (void)meetTalkShowIncomingCallFailed:(TAPMessageModel *_Nonnull)message errorMessage:(NSString *)errorMessage {
// MeetTalk SDK failed to show incoming call
}
- (void)meetTalkDidAnswerIncomingCall {
// Current/active user answers the incoming call
// Will join the incoming call by default if not implemented
}
- (void)meetTalkDidRejectIncomingCall {
// Current/active user rejects the incoming call
// Will close the incoming call by default if not implemented
}
- (void)meetTalkIncomingCallDisconnected {
// Incoming call was closed
}
#=============================================================================================
#pragma mark Conference callbacks
#=============================================================================================
- (void)meetTalkDidDisconnectFromConference:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// Current/active user was disconnected from an ongoing conference call
}
- (void)meetTalkDidReconnectToConference:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// Current/active user successfully reconnected to ongoing conference call
}
- (void)meetTalkDidJoinConference:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// Current/active user successfully joined conference call
}
- (void)meetTalkConferenceTerminated:(MeetTalkConferenceInfo *_Nullable)conferenceInfo {
// Ongoing conference call was terminated
}
#=============================================================================================
#pragma mark UI callbacks
#=============================================================================================
- (void)meetTalkChatBubbleCallButtonDidTapped:(TAPMessageModel *_Nonnull)message {
// Call button in TapUI's chat room message bubble was tapped by user
// Will initiate a new conference call by default if not implemented
}
...
@end
Last updated