General

Get TapTalk Implementation Type

You can get your current TapTalk.io implementation type by using this method.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
//Get current used implementation Type
4
[[TapTalk sharedInstance] getTapTalkImplementationType];
Copied!
Note:
TapTalkImplementationType consists of 3 types which are : TapTalkImplementationTypeUI: used for implementation with only TapUITapTalkImplementationTypeCore: used for implementation with only TapCoreTapTalkImplementationTypeCombine: used for implementation with both of TapCore and TapUI combined

Check TapTalk Initialized

You can check whether TapTalk instance has completed initialization by calling the method below.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
BOOL isInitialized = [[TapTalk sharedInstance] checkTapTalkInitialized];
Copied!

Update Application Badge Count

You can get your current TapTalk.io implementation type by using this method.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
[[TapTalk sharedInstance] updateApplicationBadgeCount];
Copied!
To listen to changes of application badge, please see the explanation in event delegate page usingtapTalkUnreadChatRoomBadgeCountUpdatedmethod

Remote Configs

A TapTalk.io project owns a remote configuration, which consists of 3 configuration types: Core Configs, Project Configs, and Custom Configs. A configuration value can be obtained with the respective configuration type's getter method, and will return a Map object. To get a specific value, call the get method from the returned dictionary with the respective key. The value obtained will always be in a String format and should be converted each according to their uses. Each configuration type will be explained below.

Core Configs

Config Key
Value
chatMediaMaxFileSize
Number of maximum allowed chat media file size in bytes
roomPhotoMaxFileSize
Number of maximum allowed group chat room profile picture file size in bytes
userPhotoMaxFileSize
Number of maximum allowed user profile picture file size in bytes
groupMaxParticipants
Number of maximum allowed participants in a group chat room
channelMaxParticipants
Number of maximum allowed participants in a channel
Below is an example to get the value of chatMediaMaxFileSize:
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
NSDictionary *coreConfigsDictionary = [[TapTalk sharedInstance] getCoreConfigs];
4
NSString *maxFileSizeString = [coreConfigsDictionary objectForKey:@"maxFileSize"];
5
NSInteger maxFileSizeValue = [maxFileSizeString integerValue];
Copied!

Project Configs

Config Key
Value
usernameIgnoreCase
"0" if username in the project is case sensitive "1" if username in the project is case insensitive
An example to obtain usernameIgnoreCase value:
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
NSDictionary *projectConfigsDictionary = [[TapTalk sharedInstance] getProjectConfigs];
4
NSString *usernameIgnoreCaseString = [projectConfigsDictionary objectForKey:@"usernameIgnoreCase"];
5
BOOL usernameIgnoreCase = [usernameIgnoreCaseString boolValue];
Copied!

Custom Configs

Custom config values are specified by the user, and can be customized through the TapTalk.io Dashboard. To get the project's custom configs, call the getCustomConfigs method.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
NSDictionary *customConfigsDictionary = [[TapTalk sharedInstance] getCustomConfigs];
Copied!

Refresh Remote Configs

To refresh remote configs with the latest updated values, call the refreshRemoteConfigs method in TapTalk.io class.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
[[TapTalk sharedInstance] refreshRemoteConfigs];
Copied!

Enable / Disable Auto Contact Sync

If you are using UI implementation method in your application, TapTalk.io provides a feature to automatically sync your user's phone contacts with their TapTalk.io contacts. You can choose to enable or disable auto contact sync by calling these methods. If auto contact sync is enabled, TapTalk.io will automatically sync your user's phone contacts and add them to TapTalk.io contacts if their phone number is registered to TapTalk.io when the application is opened. Please note that the default value is enabled.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
//Enable or disabled auto contact sync
4
//The default is enabled if you do not set this method
5
[[TapTalk sharedInstance] setAutoContactSyncEnabled:IS_ENABLED];
Copied!
Parameter IS_ENABLED: (BOOL) set to TRUE/YES to enable auto contact sync

Get Auto Contact Sync Status

Use this method to obtain auto contact sync status. This method will return true if auto contact sync is enabled.
Objective-C
1
#import <TapTalk/TapTalk.h>
2
3
BOOL isAutoContactSyncEnabled = [[TapTalk sharedInstance] isAutoContactSyncEnabled];
Copied!

Smart Local Cache Management

In order to optimize storage usage and performance, TapTalk.io cleans any local data of messages that are older than 1 month. This cleanup runs on a scheduled interval. Deleted messages can later be retrieved from the server when required.\

Obtain Current Navigation Controller in TapUI

To refresh remote configs with the latest updated values, call the refreshRemoteConfigs method in TapTalk.If you are using TapUI and want to integrate with your app, you can get the current active view controller or navigation controller by using the following codes.
Objective-C
1
//Get TapTalk.io current active view controller
2
[[TapUI sharedInstance] getCurrentTapTalkActiveViewController];
3
4
//Get TapTalk.io current active navigation controller
5
[[TapUI sharedInstance] getCurrentTapTalkActiveNavigationController];
Copied!
Last modified 2mo ago