Klat
  • TalkPlus SDK
  • Android
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • Viewing Channel LIst
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
    • What's New
  • iOS
    • Getting Started
    • Callback
    • User
      • Create / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
    • What's New
  • Unity
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification
    • Sample Application
  • JavaScript
    • Getting Started
    • Realtime Event
    • Pagination
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete
    • Channel
      • Create / Delete Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification (FCM)
    • Sample Application
    • What's New
  • Flutter
    • Getting Started
    • Callback
    • User
      • Create User / Login
      • Update User Information
      • Block / Unblock
      • Logout
      • Delete User
    • Channel
      • Create Channel
      • View Channel
      • Updating Channel
      • View Channel List
      • Manage Channel Members
      • Join / Leave Channel
      • Messaging
      • Hide / Show Channel
      • Freeze / Unfreeze Channel
      • Transfer Channel Ownership
      • Channel Push Notification Settings
      • Channel Member Data
    • Push Notification (FCM)
  • REST API
    • Getting Started
    • API
      • Users
        • Create User
        • Login (using login token)
        • View User
        • Update User
        • Activate / Deactivate
        • Enable / Disable Push Notification
        • Delete User
        • View Users
        • View Channels
        • Block / Unblock
      • Channel
        • Create Channel
        • View Channel
        • Update Channel
        • Delete Channel
        • View Channel List
        • Manage Channel Members
        • Messaging
        • Hide / Show Channel
        • Channel Freeze / Unfreeze
        • Transfer Channel Ownership
        • Channel Push Notification Settings
      • Bot
        • Create Bot
        • View Bot List
        • View Bot
        • Update Bot
        • Delete Bot
        • View Joined Channel List
        • Messaging
        • Join / Leave Channel
    • Push Notification
    • Rate Limit
  • MISC
    • Webhooks
    • SDK Rate Limit
    • Error Code
    • FAQ
      • Function
      • Spec
Powered by GitBook
On this page
  • 0. Minimum Requirements
  • 1. Installing iOS SDK
  • 2. Initialize
  • 3. Login / Logout
  • 4. Realtime Message
  1. iOS

Getting Started

PreviousWhat's NewNextCallback

Last updated 11 months ago

0. Minimum Requirements

  • 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. 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> 
import TalkPlus

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

[[TalkPlus sharedInstance] initWithAppId:@"YOUR_APP_ID"];
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.

  • 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.

https://developer.apple.com/news/upcoming-requirements/?id=04292024a
Push Notification