chat-sdk / chat-sdk-ios

Chat SDK iOS - Open Source Mobile Messenger
http://sdk.chat
Other
913 stars 276 forks source link

iOS show private thread directly #480

Closed szoszig closed 2 years ago

szoszig commented 2 years ago

Is it possible to show directly a private thread on iOS? In my app the user is already logged in firebase. It looks like if I do not present the splashviewcontroller, I cannot fetch the threads (the users or anything else but auth says I am authenticated), but if i present it once, it works like a charm (even after app restart). But if I present splash it will navigate to an unnecessary screen (main).

Any idea? Thx

AJITHAS-842 commented 2 years ago

how you resolved this?

szoszig commented 2 years ago

Finally I figured out, that it is enough to call BChatSDK.auth().authenticate() instead of showing Splash. The result is the same, the sdk is initialized, and the user is authenticated, therefore when you fetch an existing threadId, it will find it :)