voximplant / react-native-voximplant

Voximplant mobile SDK for React Native (iOS/Android)
http://voximplant.com
205 stars 39 forks source link

Authentication failure On Initial Build Only #19

Closed robbiemoore closed 7 years ago

robbiemoore commented 7 years ago

Hi, I love the library and it's really quick to implement.

I have an interesting issue, and asking to see if anyone else experienced something similar. Upon building from Xcode, the login() doesn't succeed. I'm using the LoginFailedWithErrorCode listener, but that doesn't pick anything up.

If I then press cmd + R, and hot reload, the login() works, the LoginSuccessful listener is triggered, and I'm able to make a call perfectly. This is replicated when running on an iPhone - initially the calls don't work, but hot reloading makes it work. The biggest problem with this, is when I create a bundle and install the app from iTunes, there is no option to hot reload, and so the calling does not work at all.

Interesting problem, any input or thoughts would be appreciated! Any other listeners I should try to close in on the problem?

robbiemoore commented 7 years ago

This is still a weird issue, but I found the solution. It was to check that the login had succeeded before starting the call, and if the login success listener had not been triggered, then attempt to log in again. The second time, the login works.