README.md
file.
Download Swift Chat App
Download Obj-c Chat App
Download iOS SDK from Github
Podfile
by running the following command.
pod 'CometChatCalls', '2.1.1'
in your app Podfile.CometChatPro
framework through CocoaPods.
CometChatPro
by command.
CometChatPro
framework build on Swift, you have to ensure the required libraries are embedded. This can be done by setting the “Always Embed Swift Standard Libraries”
checkbox in your target’s build settings to “Yes”:
Header Search Paths
to $SDKROOT/usr/include/libxml2
.
init()
method initializes the settings required for CometChat. We suggest you call the method on app startup preferably in the didFinishLaunchingWithOptions:
method of the AppDelegate
class.
appId
with your CometChat App ID in the above code.
createUser()
method. This method takes a User
object and the API Key
as input parameters and returns the created User
object if the request is successful.
login()
method.
The login method needs to be called in the following scenarios:
CometChat.getLoggedInUser()
function returns nil.AUTH_KEY
with your CometChat AuthKey in the above code.
cometchat-uid-1
, cometchat-uid-2
, cometchat-uid-3
, cometchat-uid-4
and cometchat-uid-5
.login()
method returns the User object containing all the information of the logged in user.