Getting Started¶
The Getting Started guide shows you how to setup and launch Referral Campaign as quickly as possible with Talkable iOS SDK.
Note
Make sure your application meets the Requirements
Installation¶
Talkable SDK could be integrated using CocoaPods or as a static library.
If you want to use CocoaPods way, here is Talkable SDK pod’s page.
To integrate the SDK as a static library, please follow next intructions:
Download the latest version of Talkable SDK framework.
Drag and place the TalkableSDK.framework somewhere suitable into your Xcode project. Make sure to add the framework to the relevant targets.
Add the following frameworks to your project:
Contacts.framework
MessageUI.framework
SafariServices.framework
Security.framework
Social.framework
WebKit.framework
To do this, click on your application’s target, then click on Build Phases and expand the Link Binary With Libraries group.
Add the following import statement to any Objective-C header (.h) or implementation (.m) file in which you wish to use the Talkable SDK.
#import <TalkableSDK/Talkable.h>
Configuration¶
Initialize Talkable in your application:didFinishLaunchingWithOptions: method, like so:
[[Talkable manager] setApiKey:@"YOUR_TALKABLE_PUBLIC_API_KEY" andSiteSlug:@"YOUR_SITE_SLUG"];Note
You can locate your credentials inside Talkable site:
Visit https://admin.talkable.com/account/sites to find your site slug
Select site and go to Dashboard → Settings → Site Settings. Find API integration section and there you will see your API Keys. Use only the public key in your application submitted to the App Store.
Register Talkable URL scheme:
Defines tkbl-<your-site-slug> as URL Scheme in your Info.plist file:
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>tkbl-<your-site-slug></string> </array> </dict> </array>Add tkbl-<your-site-slug> scheme to the list of schemes that are queried within application. Also add fb-messenger, fbauth2, whatsapp schemes if you going to utilize these sharing channels:
<key>LSApplicationQueriesSchemes</key> <array> <string>tkbl-your-site-slug</string> <string>fb-messenger</string> <string>fbauth2</string> <string>whatsapp</string> </array>Note
Please replace <your-site-slug> with your actual site slug, which you are able to find on your site Dashboard at https://admin.talkable.com
Add following lines to application:handleOpenURL: or application:openURL:sourceApplication:annotation:
[[Talkable manager] handleOpenURL:url];
Your environment is all set up! Now you need to integrate the Talkable campaign piece.
Requirements¶
The SDK supports iOS 9.0 and later.