Saranshmalik / react-native-zendesk

React native wrapper for Zendesk SDK
MIT License
29 stars 42 forks source link

App getting crash for iOS. #8

Closed sumeetm60 closed 3 years ago

sumeetm60 commented 3 years ago

Hi, app gets crash whenever we call RNZendesk.startChat({ name: "user.full_name", email: "user.email", phone: "user.mobile_phone", tags: ["tag1", "tag2"], department: "Your department", }); please help.

Saranshmalik commented 3 years ago

Please add more details here. Which version you use, how did you initialise the library, what RN version, which platform. What errors did you receive. I won't be able to help with just this.

sumeetm60 commented 3 years ago

Please add more details here. Which version you use, how did you initialise the library, what RN version, which platform. What errors did you receive. I won't be able to help with just this.

"react-native-zendesk-v2": "^0.2.1", "react-native": "0.61.2", Am using the above mentioned versions, App is getting crash for iOS, no message directly the app is force closed, but when i use with chatOnly: true option, the app wont crash and opens the chat screen but i want bot reply so i removed the chatOnly option and then it crashes on iOS. I initialized RNZendesk.initChat("Chat_id") in constructor. RNZendesk.startChat({ name: "user.full_name", email: "user.email", phone: "user.mobile_phone", tags: ["tag1", "tag2"], department: "Your department", });

Saranshmalik commented 3 years ago

Okay so if you want to use Bots and other stuff you need to initialise with RNZendesk.init method not initChat, init chat is only when you want to use chat SDKs and thus as soon as you add chatOnly:true it starts working. So change your init method and it should work then

sumeetm60 commented 3 years ago

Okay so if you want to use Bots and other stuff you need to initialise with RNZendesk.init method not initChat, init chat is only when you want to use chat SDKs and thus as soon as you add chatOnly:true it starts working. So change your init method and it should work then

but when i use chatOnly:true the messages i send, wont appear in chat list see the below screen shot. Simulator Screen Shot - iPhone 11 - 2020-12-01 at 18 02 08 Simulator Screen Shot - iPhone 11 - 2020-12-01 at 18 02 13 The "Hi" message is not visible.

Saranshmalik commented 3 years ago

Make sure you are using the right account key, most of times this happens because of wrong keys

sumeetm60 commented 3 years ago

Make sure you are using the right account key, most of times this happens because of wrong keys

Thanks @Saranshmalik for your help...My issue got resolved. The key provided to me was wrong. Great library.

akimabs commented 2 years ago

@sumeetm60 @Saranshmalik hi, i have issue with this too, my key is fine true but still nothing happen with chat