Getting Started

0. Minimum Requirements

1. Installing iOS SDK

1) Open project's Podfile and add the following line:

pod 'talkplus-ios'

2) Run pod install to install TalkPlus SDK.

pod install

Current latest version is 0.6.0

2. Initialize

1) import TalkPlus to get started.

#import <TalkPlus/TalkPlus.h> 

2) Initialize TalkPlus SDK in either AppDelegate or Main ViewController.

[[TalkPlus sharedInstance] initWithAppId:@"YOUR_APP_ID"];

3. Login / Logout

  • You need to login by calling login:success:failure: once TalkPlus SDK has been initialized.

  • Once user is logged in, FCM token that is registered stays valid until the user logs out. This allows the user to receive push notifications even when offline.

  • When user logs out, make sure to call logout function. If this step is omitted and a different user logs into the same device, the latter user will continue to receive push messages intended for the previous user.

4. Realtime Message

  • TalkPlus subscribes/unsubscribes to realtime channels in sync with app life cycle.

  • TalkPlus SDK uses WebSocket to receive messages when app is in foreground. When app goes to background, SDK uses FCM to handle messages.

  • If you intend to receive messages when app goes into background, please refer to Push Notification section on how to set up FCM.

  • FCM integration is used alongside WebSocket in order to minimize app battery consumption.

Last updated