Best Practices and Troubleshooting

There are always random issues that come up using any library. If Chat SDK is not working it's worth checking this list:

Android

I can send messages but not receive

If this happens, it means that the Chat SDK has not setup the required listeners. Internally, that means that ChatSDK.auth().authenticate().subscribe() has not been called. A way to get around this is to call this method after your app has authenticated with Firebase.

Unable to start activity ComponentInfo {...}

If the app is crashing when trying to start a Chat SDK activity, it's possible that you have created a layout file with the same name as one of the Chat SDK layout files. It is best practice to make sure the layout files are unique. You can do this by adding a prefix. If your project was called "Hello World" you could prefix your layout files with hw so hw_activity_chat for example.

App hangs after registration or login / Read and write not working

It can be that when you update the Google-Services.json file this change isn't picked up by Android studio. Delete the build folder and it will work.

iOS

Missing Header Files - SomeHeaderFile.h could not be found

Please make sure you have use_frameworks! in your Podfile.

If it still doesn't work you can clean Xcode then delete the following: Pods directory, .xcworkspace file and Podfile.lock. Run pod deintegrate. Clear the Xcode derived data and then run pod update. This will resolve any Cocoapods caching issues.

Last updated