How to implement cometchat SDK into my App??

This is the my code to intialize the comet chat but this not working what is the wrong with this cxode


override func viewDidLoad() {

super.viewDidLoad()

let cometChat : CometChat = CometChat();

let licenseKey: String = "COMETCHAT-xxxxx-xxxxxx-xxxxx-xxxxxx"

let apiKey: String = "xxxxxxxxxxxxxxxxxxxxxx"

CometChat().initializeCometChat("http://www.gamegods.com", licenseKey:licenseKey, apikey:apiKey, isCometOnDemand:true,

success: {(response) in

print("intialized succesfully")

},failure:{(error) in

print("intialized succesfully")

})

}

ERROR-


erminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'initWithAPIKey Exception : Invalid API key format'

Answered by OOPer in 325802022

The error message is clear enough, the `apiKey` is invalid. Have you correctly set the licenseKey and apiKey which you get from CometChat Admin Panel in your actual code?


(By the way please try to format your code using the icon `<>`.)

Accepted Answer

The error message is clear enough, the `apiKey` is invalid. Have you correctly set the licenseKey and apiKey which you get from CometChat Admin Panel in your actual code?


(By the way please try to format your code using the icon `<>`.)

initWithAPIKey Exception : Invalid API key format'


I downloaded project from Github: https://github.com/CometChat/ios-swift-chat-sdk-demo


And I changed API-Key and LicenseKey as in my CometChat Account. I am Getting this uncaught exception, when I run my Project it runs fine and when I hit the button INITIALIZE CHAT than it show this Exception. I am not getting why it is Coming, my Api-key and License is Valid.

please give me Solution.

Have you really followed all the steps described in this page?

developer.cometchat.com/docs/ios-quick-start


If you are sure you have followed all the steps you need and still getting the same exception,

the problem may not be so clear as I expect, or you may be missing something.


Anyway, you cannot show us your keys, so you should better contact to the support channel of CometChat.com .

How to implement cometchat SDK into my App??
 
 
Q