-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Invoking ZohoSalesIQ.Chat.show() API does not work prior to SDK initialization. #20
Comments
The process of initializing Mobilisten is asynchronous in nature. APIs like ZohoSalesIQ.initWithAppKey(appKey, accessKey: accessKey) { (success) in
if success {
ZohoSalesIQ.Chat.show()
}
} We do have plans to provide an error in return as well in the API. Using the completion closure provided with the |
ok, so do you have any method to check whether SDK is initialized or not? So I can check before calling ZohoSalesIQ.Chat.show(). Incase, I have calling init in AppDelegate for example in order to avoid wait for the user when help button tapped in ViewController. |
Yes we do. |
Right now faced one more issue, the sdk is initialized while Invoking ZohoSalesIQ.Chat.show() I am getting the following error, and no chat window is visible;
|
Hi @ammarmarn, the message shared is not related to the |
In the ViewController I am initializing the SDK, while when support button is pressed then setting some user info and then showing chat window.
|
If Mobilisten is initialized at the time of invoking the I would also like to point out that the visitor information is being incorrectly set in the shared code snippet. ZohoSalesIQ.Visitor.setName(userName)
ZohoSalesIQ.Visitor.setEmail(userEmail) I would also highly suggest having Mobilisten initialized in the AppDelegate within the Could you try applying the above suggestions and let us know if everything works as expected? |
Thanks for the suggestions I will incorporate them, one thing want to ask that instead of removing initialization in viewDidLoad() I am thinking to check if SDK is initialized if not then initialize it within the check.
|
This would not be needed since Chat may be disabled for other reasons as well. For example, if you choose to hide the chat option when operators are offline. Within the viewDidLoad method of a view controller, the value for |
Apart from above question I got this crash: |
The value for The value can be false in the following cases:
In this case, you may display the "Support" option as disabled (greyed out) or be hidden. |
We hope that the API reference provided answers your question. We are closing this issue since it has had no recent activity. |
Describe the bug
The chat will not open on calling ZohoSalesIQ.Chat.show() if Mobilisten is unable to initialize yet for any undefined reason (no idea why its taking time even if called in appdidFinishLaunching).
To Reproduce
That's how we do right now on code:
ZohoSalesIQ.initWithAppKey("....")
ZohoSalesIQ.Chat.show()
Expected behavior
the chat window should always show or atleast give a error so developer can handle the failure.
Finding
If this "✅ MOBILISTEN » INITIALIZED {4.1.0}" is not printed yet the calling "ZohoSalesIQ.Chat.show()" will have no affect.
The text was updated successfully, but these errors were encountered: