iOS/BasicVideoCall/BasicVideoCall/ChannelViewController.m [59:98]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (IBAction)exitChannel:(UIButton *)sender {
    [self leaveChannel];
    [self destroyEngineKit];
    UIApplication.sharedApplication.idleTimerDisabled = NO;
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)onBye:(DingRtcOnByeType)code {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Leave channel with indication: %ld.", (long)code]];
        UIApplication.sharedApplication.idleTimerDisabled = NO;
        [self dismissViewControllerAnimated:YES completion:nil];
    });
}

- (void)onOccurError:(int)error message:(NSString *_Nonnull)message {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Occur error: %ld, message:%@.", (long)error, message]];
    });
}

- (void)onOccurWarning:(int)warn message:(NSString *_Nonnull)message {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Occur warning: %ld, message:%@.", (long)warn, message]];
    });
}

- (void)onRemoteUserOnLineNotify:(NSString *_Nonnull)uid elapsed:(int)elapsed {
    dispatch_async(dispatch_get_main_queue(), ^{
        NSDictionary *infoDic = [self.engine getUserInfo:uid];
        NSString *userName = infoDic[@"displayName"];
        [self displayMessage:[NSString stringWithFormat:@"User %@(%@) join channel.", uid, userName]];
        [self.userManager addUser:uid withName:userName];
    });
}

- (void)onRemoteUserOffLineNotify:(NSString *_Nonnull)uid offlineReason:(DingRtcUserOfflineReason)reason {
    dispatch_async(dispatch_get_main_queue(), ^{
        UserInfo * user = [self.userManager removeUser:uid];
        [self displayMessage:[NSString stringWithFormat:@"User %@(%@) leave channel with reason: %ld.", uid, user.userName, reason]];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



iOS/ScreenSharing/ScreenSharing/ChannelViewController.m [48:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (IBAction)exitChannel:(UIButton *)sender {
    [self leaveChannel];
    [self destroyEngineKit];
    UIApplication.sharedApplication.idleTimerDisabled = NO;
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)onBye:(DingRtcOnByeType)code {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Leave channel with indication: %ld.", (long)code]];
        UIApplication.sharedApplication.idleTimerDisabled = NO;
        [self dismissViewControllerAnimated:YES completion:nil];
    });
}

- (void)onOccurError:(int)error message:(NSString *_Nonnull)message {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Occur error: %ld, message:%@.", (long)error, message]];
    });
}

- (void)onOccurWarning:(int)warn message:(NSString *_Nonnull)message {
    dispatch_async(dispatch_get_main_queue(), ^{
        [self displayMessage:[NSString stringWithFormat:@"Occur warning: %ld, message:%@.", (long)warn, message]];
    });
}

- (void)onRemoteUserOnLineNotify:(NSString *_Nonnull)uid elapsed:(int)elapsed {
    dispatch_async(dispatch_get_main_queue(), ^{
        NSDictionary *infoDic = [self.engine getUserInfo:uid];
        NSString *userName = infoDic[@"displayName"];
        [self displayMessage:[NSString stringWithFormat:@"User %@(%@) join channel.", uid, userName]];
        [self.userManager addUser:uid withName:userName];
    });
}

- (void)onRemoteUserOffLineNotify:(NSString *_Nonnull)uid offlineReason:(DingRtcUserOfflineReason)reason {
    dispatch_async(dispatch_get_main_queue(), ^{
        UserInfo * user = [self.userManager removeUser:uid];
        [self displayMessage:[NSString stringWithFormat:@"User %@(%@) leave channel with reason: %ld.", uid, user.userName, reason]];
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



