Getting Started
Last updated
Last updated
iOS 10.0 or later
Xcode 15.0 or later Starting April 29, 2024, Xcode 15.0 or later is required to submit apps to the app store.
Support for CocoaPods
1) Open project's Podfile
and add the following line:
2) Run pod install
to install TalkPlus SDK.
1) import
TalkPlus to get started.
2) Initialize TalkPlus SDK in either AppDelegate or Main ViewController.
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.
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.
FCM integration is used alongside WebSocket in order to minimize app battery consumption.
If you intend to receive messages when app goes into background, please refer to section on how to set up FCM.