Install and Configure
This section contains how you can embed Channelize.io powered real-time messaging to your iOS applications using CocoaPods.
Install and Configure the SDK
1. Install CocoaPods
For developers who had never used CocoaPods for an Xcode project, open a terminal window, move to your project directory, and then create a Podfile
by running the below command:
pod init
Add the below lines to the Podfile:
platform :ios, '10.3'
target 'YourProject' do
use_frameworks!
pod 'ChannelizeAPI'
end
a. Developers having Xcode 11 should use Cocoapods with the version starting from 4.11.0.
pod 'ChannelizeAPI', '~> 4.11.0'
b. Developers having Xcode 10 should use Cocoapods with the version starting from 4.10.0.
pod 'ChannelizeAPI', '~> 4.10.0'
Now install the Channelize API framework through CocoaPods.
pod install
2. Create .plist file
You need to create a .plist
file with name Channelize-Info.plist
which will contain all required keys i.e Channelize.io Public Key, Giphy API Key, Agora API Key, and Maps API Key.
For using iOS API SDK this file should only have Public key as shown below:
<key>PUBLIC_KEY</key>
<string>xxxx PublicKey xxxx</string>
3. Use SDK Methods
Now use all classes and methods with the import statement.
import Channelize_API
4. Configure SDK
To configure SDK you need to add the following code in didFinishLaunchingWithOptions
function of your project's AppDelegate.swift
file.
Channelize.configure()