livechat / chat-window-ios

Embeding LiveChat mobile chat window in iOS application
MIT License
24 stars 31 forks source link

Chat window doesn't open #25

Closed Rendel27 closed 5 years ago

Rendel27 commented 5 years ago

Hello,

I've implemented Live Chat SDK into app:

import LiveChat
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool
    {
        LiveChat.licenseId = Constants.LiveChat.id
        LiveChat.delegate = self

        return true
    }

Then I try to present chat using the following method:

        LiveChat.presentChat()

The problem is that the chat mostly doesn't open. It presents infinite loading screen. simulator screen shot - iphone 8 - 2019-01-18 at 15 24 30

I did everything as it is written in the documentation. Please, have a look to the issue

ZiggyKraus commented 5 years ago

Hello @Rendel27 ,

Thank you for reporting this! I have got two questions:

Thanks in advance for your reply!

Rendel27 commented 5 years ago

Hello @ZiggyKraus ,

  1. We use same Id for both iOS and Android SDK. (7373141)
  2. There are no error messages in logs related to Live Chat
Rendel27 commented 5 years ago

@ZiggyKraus , I've added the id in the comment above.

ZiggyKraus commented 5 years ago

Hello @Rendel27 ,

So sorry for the late response. To be honest, without any error messages thrown by your LC implementation I'd guess that this is a problem caused by the way in which you are implementing the whole LiveChat widget into your project, but there's not much that rely on for the moment. However, I've got one idea that can help, based on similar issues reported by our customers in the past.

@Rendel27 could you try to add the following line of code to your LiveChat implementation:

LiveChat.groupId = "0"

and, after doing so, could you try to present your chat window as well? If that won't help, please don't hesitate to let me know and I will consult this case with our iOS developer. We may also need some additional details about your LiveChat implementation to diagnose it properly, but we will cross that bridge when we get there :)

Thank you very much in advance!

Rendel27 commented 5 years ago

Hello @ZiggyKraus ,

We implement live chat as it is described in documentation. There is no such thing called "groupId" presented in documentation. We have created new test project which has only Live Chat SDK implementation and the issue still remains. We can send you this project if you are wiling to examine or debug it.

Regarding the groupId: The result is same by adding the following code: LiveChat.groupId = "0"

There are no logs appear in console :(

Thanks Rendel

ZiggyKraus commented 5 years ago

@Rendel27

Sorry for the late reply! Just as mentioned before, we might need the access to the source code of the application: if you could provide us with the source code of your app or the link to the repository where we could run the project natively at your side, I will ask our iOS developer if he could check it out and see what might be going wrong there, however I cannot promise any specific ETA.

Thank you in advance for providing us with additional details!

Rendel27 commented 5 years ago

@ZiggyKraus

This is a test project which contains only chat and faces the same issue. https://bitbucket.org/wandio/testlivechat.git

neelbakshi94 commented 5 years ago

Any update on this issue?

Rendel27 commented 5 years ago

@ZiggyKraus Do you have any update regarding this?

ZiggyKraus commented 5 years ago

@Rendel27 @neelbakshi94 Unfortunately, I'm genuinely sorry, but I'm afraid that we do not have an update regarding this issue yet. :( I can confirm that our developers were not able to recreate the issue that you have described in your initial messages (we've run some tests on our LiveChat application that includes the native chat widget for iOS), but we did not get a chance to review the code that you have provided us with.

I will reach out to our iOS developer and ask if he'll be able to put a higher priority on this particular issue and I will do my best to let you know asap.

kamil-szostakowski commented 5 years ago

Hi @Rendel27 @neelbakshi94 please add one or both of the following lines to your configuration. I verified the sample project and it looks like widget requires at least one of these lines to start. I will check why this is like that but for the time being it may unblock you.

LiveChat.email = "loremipsum@example.com"
LiveChat.name = "Lorem Ipsum"

Please let me know it it helps.

kamil-szostakowski commented 5 years ago

The root cause of this issue is the fact that the widget configuration wasn't correctly updated when you set only one configuration parameter (eg license id). Fixed by pull request #28.

Fix is available in version 2.0.12.

Rendel27 commented 5 years ago

Hi @kamil-szostakowski ,

I've added the part of code about email and name properties and it works using that. But we don't want to autofill that data for users. I've updated pods and installed 2.0.12 version but the issue still exists. (without autofill email & name properties).

kamil-szostakowski commented 5 years ago

Hi @Rendel27

Are you sure that you updated to 2.0.12? I checked again with the sample project you provided us with and everything is working like a charm. Could you please paste the log from your pod update?

Getting back to the workaround, it's enough to do something like that. You don't have to provide a full email address.

LiveChat.name = " "
LiveChat.name = ""
Rendel27 commented 5 years ago

I've updated pods on real project not on the test one. But it seems chat window just started to open normally without assigning name and email properties. As it works for now I won't implement "assigning" workaround. If it started bugging again I'll add the workaround you've mentioned before. And if it still didn't help I'll notify you. Thanks for your assistance. Giorgi