Introduction

https://github.com/tagove/CocoaPods


Add Private pod to your Podfile


For xcode 8 or later:

  1. Go to Project/Targets -> [Project Name] -> Build Settings.

  2. search "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"

  3. click the right of Debug, and selected 'Other', input "$(inherited)"

  4. do same with 'Release' and install your pod


In iOS 10, Before you access privacy-sensitive data like Camera, Microphone, and so on, you must ask for the authorization, or your app will crash when you access them.


Open the file in your project named info.plist, right click it, opening as Source Code, paste this code below to it. Or you can open info.plist as Property List by default, click the add button, Xcode will give you the suggest completions while typing Privacy - with the help of keyboard and Remember to write your description why you ask for this authorization, between and , or your app will be rejected by apple:

pod 'Tagove'            // For normal version

NSCameraUsageDescription
$(PRODUCT_NAME) use camera for video chat


NSMicrophoneUsageDescription
$(PRODUCT_NAME) use microphone for voice chat
                                        

Swift Example

here are some Swift Example.

import Tagove

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        ...
        Tagove.sharedObject().initForAccount("YOUR_ACCOUNT_UID", withOptions: nil)
        ...
        return true
    }
                                        
Options is a NSDictionary with following setting option:
NSDictionary *option = @{
   @"UseDefaultTheme":(@YES|@NO), // Default NO
   @"ScreenShareBorder": (@YES|@NO), // Default YES
   @"ShowAvatar": (@YES|@NO),      // Default YES
   @"ShowVideoButton": (@YES|@NO), // Default YES
   @"ShowAudioButton": (@YES|@NO) // Default YES
};
                                            
import Tagove


//Call this method to open support view

Tagove.sharedObject().showSupport(self)
                                        

Objective-C Example

here are some Objective-C Example.

#import 

...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    ...
    [[Tagove sharedObject] initForAccount:@"YOUR_ACCOUNT_UID" withOptions:nil]; //Required for init support
    ...

    return YES;
}
                                        
#import 


//Call this method to open support view

[[Tagove sharedObject] showSupport:self];
                                        
// (Use .png format 30x30 px image)

[[Tagove sharedObject] initForAccount:"YOUR_ACCOUNT_UID" buttonImage:(UIImage *)image withOptions:nil];
                                        

Methods


  • initForAccount: withOptions: - This is init method for initilize Tagove chat. When you calling initForAccount method you must pass one accountUID parameter Option can be nil.

  • initForAccount: buttonImage: withOptions: - This is init method for initilize Tagove chat with system button bottom right. When you calling this method you must pass accountUID and buttonImage UIImage parameter Option can be nil.

  • setVisitorIdentifier: - Set an visitor identifier for your visitor, can be tracked by admin.

  • setVisitor: andEmail: - Set the name and email of the app visitor.

  • showSupport: - Show support view controller from current viewcontroller, will call after initForAccount method done. This method must pass a valid viewController instance.

  • getUnreadCount - Total unread count of message(s).

  • getAvailableAgentCount - Total unread count of message(s).

Protocol


Optional

  • changeAgentStatus: andStatus: - When any agent status update. First paramater is agentID and second is status (AgentStatus enum).

  • updateUnreadCount - When receive chat message count will be increase. First paramater is integer count of unread message(s).

Theme Setting


Using UIAppearance

UIAppearance customisations are applied to Tagove SDK by default. However if there is a conflicting property, then the value in TagoveConfig.plist will take precedence.

For example: If the app uses UIAppearance to change the colour of Navigation Bar title and also specifies a colour for the same property in the TagoveConfig.plist file, then the value in plist will be used. In order to use the UIAppearance value, the app must leave the corresponding entry in the plist blank.

if you don't want to use TagoveConfig.plist properties to SDK the use init method attribute option to 'UseDefaultTheme' to @YES.

Introduction

Head over to Theming if you want to customize your SDK integration's typeface, colors or fonts. It is done via simple key-value pairs in a plist file.

Theme Setting

To skin your app, make sure you add TagoveConfig.plist into your project main bundle and set values for attributes in TagoveConfig.plist. You can copy TagoveConfig.plist from Frameworks/Tagove.framework/TagoveTheme/TagoveConfig.plist.

Colors
Colors are specified in hexadecimal format, e.g. #FFFFFF is White. # is required before code
Fonts
Font names should be specified by their family name & style. For example, CaviareDreams-Bold refers to Caviare Dreams family of bold style. See using custom fonts section for more details.

Global Attributes

These attributes control the looks of in-app support over many screens.

THEME_COLOR
Applies theme color to whole support SDK according to your app theme. Default theme color is #448ee1
FONT_NAME
Global font face - applies to texts for sections list, Chat list, Offline form and all. Default font is system font with size according to requirement
BOLD_FONT_NAME
Applies to headers on chat screen and title of pages. Default font is system bold font with size according to requirement

Navigation Bar

BAR_STYLE
Use UIBarStyleBlack or UIBarStyleDefault. Default bar style is UIBarStyleDefault
BAR_TINTCOLOR
The tint color to apply to the navigation bar background. This color is not made translucent by default unless you set the isTranslucent property to true. Default BAR_TINTCOLOR is #FFFFFF
TINT_COLOR
The tint color is navigation title and back and other bar button items color. For more see image bellow. Default color is #000000
 

 

System Button Attributes

These attributes applies on default bottom right support button.

BACKGROUND_COLOR
Applies to background color of button. Default theme color is THEME_COLOR
BUTTON_INSET_BOTTOM
Inset button from bottom in NSNumber. default bottom inset is 0.
BUTTON_INSET_RIGHT
Inset button from right in NSNumber. default right inset is 0.

System Button Badge Attributes

These attributes applies on default bottom right support button notification badge.

BACKGROUND_COLOR
Applies to background color of button badge. Default color is red
TEXT_COLOR
Button badge color. Default color is #ffffff.

Using Custom Fonts

Add the font to your project. Edit your app's plist file and add a key "Fonts provided by application" to it. Under the key, list out file names of all the fonts you want to use in your app and in support. If you've already listed such fonts, skip this step.

Step 2: Copy the font's full name. To do this, select the font in Finder and hit Command+I (Get Info).

Step 3: Paste the font name into TgaoveConfig.plist, wherever necesary

Step 4: Test the font and theme in simulator. If font couldn't load by SDK then it will show error —

Orientation support

By default, the iOS SDK will follow the orientation of the app.