crisp-im / crisp-sdk-ios

:package: Crisp iOS SDK, add a chat in any iOS app and communicate with your users.
https://docs.crisp.chat/guides/chatbox-sdks/ios-sdk/
Other
44 stars 19 forks source link

Chat fails to start with token id #23

Closed xHunter closed 1 year ago

xHunter commented 4 years ago

I've seen the chat failing when it's restoring a chat from a token also session reset seems unreliable, changing user and token keeps showing the previous chat.

eliottvincent commented 4 years ago

Hello, could you pease elaborate? Could you send a snippet of your code for restoring with the token?

xHunter commented 4 years ago

I'm setting user details when the registered user starts a session (app)

CrispSDK.setTokenID(tokenID: user.crispTokenId)
CrispSDK.user.email = user.email
CrispSDK.user.nickname = user.name

Then later when the chat is presented self.present(Crisp.ChatViewController(), animated: true) if the token id was used in another platform (e.g. Android) the chat displays an alert that it failed to start the chat.

gergof commented 3 years ago

I've discovered the same problem and it's still present in the latest release.

What I do:

What I get:

If I don't set the tokenID there's no problem.

Update: After some more testing I've found out that the problem only exists when the tokenID was previously used on an other device (for example in web).

nesium commented 1 year ago

Hi everyone,

It’s been a while since this issue was reported, and we’ve launched a new major version of the Crisp SDK since then. The updates might have resolved the issue you encountered.

We’d appreciate it if you test the latest version to see if the issue persists. Feel free to reopen this issue with more details if needed.

Thanks for your support!