-
Notifications
You must be signed in to change notification settings - Fork 0
Migration From .framework to SDKs
rohitphogat19 edited this page May 14, 2019
·
6 revisions
To migrate to SDKs, follow these procedure
- Remove Existing
PrimeMessenger.frameworkfile from your Project. - Clean your project.
- Remove
import PrimeMessengerfrom your code from files where you are using it. - Remove old integration code from your project.
Open your podFile and Install following pods for Channelize to run. It will install all pods required by Channelize
pod 'ChannelizeUI'
pod 'ChannelizeAPI'
pod 'Chatto', :git => 'https://github.com/BigStepTechnologies/Chatto', :branch => 'bigstep/v1.0'
pod 'ChattoAdditions', :git => 'https://github.com/BigStepTechnologies/Chatto', :branch => 'bigstep/v1.0'If You want to use Voice and Video Call Module then also Include
pod 'ChannelizeVV'To import Channelize where you want, use following command
import Channelize_API
import ChannelizeFollowing files are required to work Channelize Properly
- Channelize-Info.plist
- CHLocalizable.strings
<key>MAP_API_KEY</key>
<string>GOOGLE_MAP_API_KEY</string>
<key>PUBLIC_KEY</key>
<string>Public_Key_of_APP</string>
<key>GIPHY_API_KEY</key>
<string>GIPHY_ACCOUNT_KEY</string>
<key>AGORA_API_KEY</key>
<string>Agora_Api_Key</string>Note
- Giphy key is required if you want to enable GIF and Sticker Messages
- Agora Key is required if you want to enable Voice and Video Call Module
To configure Channelize you need to add the following code in didFinishLaunchingWithOptions function of your project's AppDelegate.swift file
Channelize.configure()Channelize.main.login(username: email, password: password){(user,error) in
if error != nil {
}else{
}
}Make Sure Channelize.main.currentUserId() != nil before Launching Channelize
if let navigationController = UIApplication.shared.keyWindow?.rootViewController as? UINavigationController{
CHMain.instance.launchApp(navigationController: navigationController, data: nil)
}let userData : [AnyHashable:Any] = [AnyHashable("userId"):USER_ID]
if let navigationController = UIApplication.shared.keyWindow?.rootViewController as? UINavigationController{
CHMain.instance.launchApp(navigationController: navigationController, data: userData)
}Channelize.setUserOffline(completion: {(status,error) in
})Channelize.setUserOnline(completion: {(status,error) in
})Channelize.main.logout()