TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Configure and Initialize TapTalk.io iOS SDK
  • Initialize Google Places API Key (Optional)
  • Open Your First Room List

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk iOS

Get Started

PreviousPowerTalk iOSNextTapUI and TapCore

Last updated 1 month ago

Was this helpful?

Configure and Initialize TapTalk.io iOS SDK

Step 1: Create a new application from your dashboard

1. Login to , then choose Development -> Apps

2. Click New App Button, input App Name and choose Platform, and then click Create New App Button.

3. A pop-up dialog will be shown with provided App Key ID & App Key Secret

Step 2: Install TapTalk.io SDK

$ pod init

Then Podfile will be created in your project directory. Open the Podfile and add the following lines to the Podfile.

# Please make sure you define platform on your Podfile
# Make sure to use ios 11.0 for minimum deployment target

platform :ios, '11.0'
use_modular_headers!

target "YourProjectName" do
    pod 'TapTalk'
end

Note: For SDK version 1.4.1 and above, use_frameworks! can be replaced with use_modular_headers! to handle some compatibility issues.

For versions below 1.4.1, you can replace use_modular_headers! on the code above with use_frameworks!

Note: Please make sure you implement ios version 11.0 platform :ios, '11.0' for minimum deployment target to obtain the latest update of TapTalk.io SDK

Since TapTalk.io use uses git-lfs (Git Large Files Storage) you will need to install GIT LFS to clone/install TapTalk.io SDK through Cocoapods.

Note: Make sure to install git-lfsbefore pod install, otherwise the pod install / pod update will return an error

brew install git-lfs
git lfs install

Next, after the git-lfs is installed, install the TapTalk.io SDK through CocoaPods.

$ pod install

Step 3: Grant permission in your application project

To make sure TapTalk.io has all permission to access the user's media, file, location, and contact, the application needs to ask for permission. Go to your info.plist, and add the following key-value pairs.

Information Property Key

Information Property Value

Privacy - Camera Usage Description

$(PRODUCT_NAME) needs to request access to your camera to send image messages and take profile picture.

Privacy - Contacts Usage Description

$(PRODUCT_NAME) need your permission to access your contact, we will sync your contact to our server and automatically find your friend so it is easier for you to find your friends.

Privacy - Photo Library Additions Usage Description

$(PRODUCT_NAME) needs to request access to your photo library to save photos.

Privacy - Photo Library Usage Description

$(PRODUCT_NAME) needs to request access to your photo library to send image messages and select profile picture.

Privacy - Location When In Use Usage Description

$(PRODUCT_NAME) needs to request access to your location to send location messages.

Privacy - Microphone Usage Description

$(PRODUCT_NAME) needs to request access to your microphone to record audio to send voice messages.

Note: You can change Information Property Value with your preferred message, the string value will be displayed when the application requests the permission.

Step 4: Enable background modes

After you turn on the Background Modes, Required background modes key will be added automatically in your Info.plist as shown below.

Step 5: Initialize Taptalk.io in your Application class

In order to use TapTalk.io, you must first initialize a TapTalk.io instance by passing the APP_KEY_ID, APP_KEY_SECRET, APP_BASE_URL, and IMPLEMENTATION_TYPE assigned to your application to the initWithAppKeyID:appKeySecret:apiURLString:implementationType: method as a parameter. Generally, initialization is implemented in the appDelegate application:didFinishLaunchingWithOptions: method.

AppDelegate.m
// Import TapTalk.io
#import <TapTalk/TapTalk.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Initialize TapTalk.io
    [[TapTalk sharedInstance] initWithAppKeyID:APP_KEY_ID appKeySecret:APP_KEY_SECRET apiURLString:APP_BASE_URL implementationType:IMPLEMENTATION_TYPE];
  
}

Parameters APP_KEY_ID: (String) application key ID APP_KEY_SECRET: (String) application key Secret APP_BASE_URL: (String) base API URL IMPLEMENTATION_TYPE: (enum) found in TapTalkImplentationType, more detailed information below

IMPLEMENTATION_TYPE TapTalkImplementationType consists of 3 types which are: TapTalkImplementationTypeUI: used for implementation with only TapUI TapTalkImplementationTypeCore: used for implementation with only TapCore TapTalkImplementationTypeCombine: used for implementation with both of TapCore and TapUI combined

You may also call initWithAppKeyID:appKeySecret:apiURLString:implementationType:success: to obtain callback once the initialization is finished.

AppDelegate.m
// Import TapTalk.io
#import <TapTalk/TapTalk.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
 
  //Initialize TapTalk.io
  [[TapTalk sharedInstance] initWithAppKeyID:APP_KEY_ID 
                                appKeySecret:APP_KEY_SECRET 
                                apiURLString:APP_BASE_URL 
                          implementationType:IMPLEMENTATION_TYPE
                                     success:^{
      // Initialization finished
  }];
}

Parameters APP_KEY_ID: (String) application key ID APP_KEY_SECRET: (String) application key Secret APP_BASE_URL: (String) base API URL IMPLEMENTATION_TYPE: (enum) found in TapTalkImplentationType, more detailed information below

IMPLEMENTATION_TYPE TapTalkImplementationType consists of 3 types which are: TapTalkImplementationTypeUI: used for implementation with only TapUI TapTalkImplementationTypeCore: used for implementation with only TapCore TapTalkImplementationTypeCombine: used for implementation with both of TapCore and TapUI combined

Step 6: Implement application delegate

Step 7: Authenticate to TapTalk.io

Initialize Google Places API Key (Optional)

#import <TapTalk/TapTalk.h>
  
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //Initialize Google Places API Key
    [[TapTalk sharedInstance] initializeGooglePlacesAPIKey:GOOGLE_PLACES_API_KEY]; 
}

Parameters GOOGLE_PLACES_API_KEY: (String) Google Places API Key

Starting from version 2.16.0, location attachment will be enabled by default even when Google Places API Key is not provided, but location search will be hidden. To disable location attachment, you may call:

[[TapUI sharedInstance] setLocationAttachmentEnabled:NO];

Open Your First Room List

YourViewController.m
#import <TapTalk/TapUIRoomListViewController.h>
#import <TapTalk/TapUI.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Initialize TapTalk.io room list view controller here
    TapUIRoomListViewController *roomListViewController = [[TapUI sharedInstance] roomListViewController]; 
    UINavigationController *roomListNavigationController = [[UINavigationController alloc] initWithRootViewController:roomListViewController];
  
    // You can choose to present or push view controller
  
    // Present room list view
    [self presentViewController:roomListViewController animated:YES completion:^{
      // Completion
    }];
  
    // Push room list view
    [self.navigationController pushViewController:roomListNavigationController animated:YES]; 
  
    // or you can add to your window root view controller
    self.window.rootViewController = roomListNavigationController;
  
}

Note: Please remember to save your App Key ID & your App Key Secret because it will only be shown once and will be used in

You can install the TapTalk.io iOS SDK using like the following. If you are new to CocoaPods, you can see more information in . To create a Podfile, open a terminal window, navigate to your project directory, and then create a Podfile by running the following command:

Easiest way to install is using :

Background modes is required to handle background process in TapTalk.io. It is used to run some processes in the background before the app is killed. For more information about the processes, check out the . To enable background modes, go to Target -> Capabilities, then turn Background Modes toggle to ON, next select Background fetch and Remote notifications

Note: To get BASE_URL you can follow our documentation on on TapTalk.io.

Note: In the page, you can find detailed information on the usages of TapTalk iOS SDK's delegates and callbacks.

To allow the iOS SDK to respond to the connection and state changes in your iOS client app, you have to implement all of our application delegate methods in your UIApplicationDelegate methods in appDelegate file. You can follow the instructions in .

In order to use the abilities of the iOS SDK in your client app, a TapTalk instance must be initiated in each client app through user authentication with TapTalk.io server. An authenticated user account allows the instance to communicate and interact with the server. To authenticate your user with the server, follow the instructions in .

To enable location search result preview while sending location message, a Google Places API Key is required. To obtain the API key for your application, you can check provided by Google. To initialize, insert your obtained key using the initializeGooglePlacesApiKey() method.

To open room list view, simply initialize TAPRoomListViewController and choose to present or push the selected controller to your current view. Here we use TapUI to open room list view. Creating a user interface won't be necessary, because TapTalk.io have provided an integrated user interface to be used in your application. To use TapTalk.io's chat interface, simply initialize our TapUI method and you are good to go. For more information about TapUI and TapCore, please see page.

Note: For more information about Room List View for TapUI, please see .

CocoaPods
Cocoapods guides
git-lfs
brew
background process section
how to get Base URL
Event Delegate
Implement Application Delegate page
Authentication page
the documentation
TapUI and TapCore
Room List section
TapTalk.io initialization
TapTalk.io Dashboard