TCGBContact Class Reference

Inherits from NSObject
Declared in TCGBContact.h

Request Showing Online Contact

+ openContactWithViewController:completion:

This is the method to request showing online contact. There is a viewController parameter and you may put your top most viewController. When closed showing online contact, this method calls completion.

+ (void)openContactWithViewController:(nullable UIViewController *)viewController completion:(nullable void ( ^ ) ( TCGBError *_Nullable error ))completion

Parameters

viewController

represent to current viewcontroller.

completion

completion may call when finished showing online contact. If there is an error, TCGBError will be returned.

Usage Example

  • (void)showOnlineContact { [TCGBContact openContactWithViewController:self completion:^(TCGBError *error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Failed to open online contact. Error : %@”, error); }); } else { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Closed online contact.”); }); } }]; }

Discussion

Request Showing Online Contact.

Declared In

TCGBContact.h

+ openContactWithViewController:configuration:completion:

This is the method to request showing online contact. There is a viewController parameter and you may put your top most viewController. When closed showing online contact, this method calls completion.

+ (void)openContactWithViewController:(nullable UIViewController *)viewController configuration:(nullable TCGBContactConfiguration *)configuration completion:(nullable void ( ^ ) ( TCGBError *_Nullable error ))completion

Parameters

viewController

represent to current viewcontroller.

configuration

This configuration includes userName.

completion

completion may call when finished showing online contact. If there is an error, TCGBError will be returned.

Usage Example

  • (void)showOnlineContact { TCGBContactConfiguration configuration = [TCGBContactConfiguration contactConfigurationWithUserName:@“USER_NAME”]; [TCGBContact openContactWithViewController:self configuration:configuration completion:^(TCGBError error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Failed to open online contact. Error : %@”, error); }); } else { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Closed online contact.”); }); } }]; }

Discussion

Request Showing Online Contact.

Declared In

TCGBContact.h

Request Online Contact URL

+ requestContactURLWithCompletion:

This is the method to request online contact url.

+ (void)requestContactURLWithCompletion:(void ( ^ ) ( NSString *_Nullable contactUrl , TCGBError *_Nullable error ))completion

Parameters

completion

completion may return online contact url. If there is an error, TCGBError will be returned.

Usage Example

  • (void)showOnlineContact { [TCGBContact requestContactURLWithCompletion:^(NSString contactUrl, TCGBError error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Failed to request online contact url. Error : %@”, error); }); } else { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Online contact url : %@”, contactUrl"); }); } }]; }

Discussion

Request Online Contact URL.

Declared In

TCGBContact.h

+ requestContactURLWithConfiguration:completion:

This is the method to request online contact url.

+ (void)requestContactURLWithConfiguration:(nullable TCGBContactConfiguration *)configuration completion:(void ( ^ ) ( NSString *_Nullable contactUrl , TCGBError *_Nullable error ))completion

Parameters

configuration

This configuration includes userName.

completion

completion may return online contact url. If there is an error, TCGBError will be returned.

Usage Example

  • (void)showOnlineContact { TCGBContactConfiguration configuration = [TCGBContactConfiguration contactConfigurationWithUserName:@“USER_NAME”]; [TCGBContact requestContactURLWithConfiguration:configuration completion:^(NSString contactUrl, TCGBError *error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Failed to request online contact url. Error : %@”, error); }); } else { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Online contact url : %@”, contactUrl"); }); } }]; }

Discussion

Request Online Contact URL.

Declared In

TCGBContact.h