taskrabbit / react-native-zendesk-chat

React Native Wrapper around Zendesk Chat v2
MIT License
130 stars 126 forks source link

iOS Issues depending on config #126

Open nhannah opened 2 years ago

nhannah commented 2 years ago

Hi @fbartho; contacting you in a different capacity from when we last spoke. I am actually using your ZenDesk library and have run into some funny business I wanted to ask if you had seen before. Everything was working fine until maybe 2 months ago, then iOS just stopped working. I tracked it down to the fact that I could no longer start a chat with a name provided on iOS, nor could I set the preChatFormOptions to have name as hidden any longer. My only option on iOS was something like this:

 name: (Platform.OS === 'android' && preferredName) || undefined,
 preChatFormOptions: {
        name: Platform.OS === 'android' && preferredName ? 'hidden' : 'required',

Doing the more logical platform free check would result in the chat never starting on iOS, the bot would not pop up, none of that, just stuck on a blank chat screen and messages would never be marked as sent. So I added this code in and started asking for names on iOS despite not needing them. Then this week it seemed I hit another bug, again no changes. I found, as I saw elsewhere in another issue, if department was set on iOS I would get the bot responses, then a dead end, "thanks for issue", "thanks for name", no connection to a person after the bot was done. Removing department led to another new state, I would get the bot, the name would be asked for, it was say "thanks" then nothing, but if I again typed a message I would get connected as expected. My final solution just involved dropping department and setting showPreChatForm false on iOS. This loses the bot and starts people on an empty screen, but at least they connect and know someone is coming after their first message.

The initial name issue I hardcoded in objC the same values and experienced the same issues, I contact ZD and they asked me to test out their test project, but I have not had time yet. I was curious if you have seen any of these issues yourself? It seems so strange they occur without code changes or library updates, yet ZD had said it must be my side as they don't see an issue.

nhannah commented 2 years ago

After booting up ZD sample code last night, I believe they have a bug: https://support.zendesk.com/hc/en-us/community/posts/4412333176730-iOS-SDK-initWithName-Broken-as-of-2-days-ago?page=1#community_comment_4416579656090 .