-
Notifications
You must be signed in to change notification settings - Fork 0
Migration From .framework to SDKs
rohitphogat19 edited this page May 13, 2019
·
6 revisions
To migrate to SDKs, follow these procedure
- Remove Existing
PrimeMessenger.framework
file from your Project. - Clean your project.
- Remove
import PrimeMessenger
from 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'
To import Channelize where you want, use following command
import Channelize_API
import Channelize
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()