Hello Sendbird Community,
I’m experiencing a crash in my iOS application using SendbirdChatSDK. The crash occurs specifically at the line where I call the serialize()
function on a KCSUserMessage
object. Here are the details:
- Sendbird SDK Version: SendbirdChatSDK - 4.12.0
- iOS Version: 17.0 and upper
- Development Environment: Xcode 15
Code Snippet:
do {
if let lSerialize = try sbMessageRef.serialize() {
chatMessage.payload = lSerialize
} else {
print("Warning: sbMessageRef.serialize() returned nil")
}
} catch {
print("Error serializing sbMessageRef: \(error.localizedDescription)")
}
Crash Details:
- The crash is logged on Firebase, and it points to the
serialize()
function call. - The error message often indicates an issue with the underlying socket connection or data serialization.
Steps to Reproduce:
- A user sends or receives a message.
- The app attempts to serialize the message using
sbMessageRef.serialize()
. - The app crashes intermittently at this point.
What I’ve Tried:
- Updating the SDK: Ensured the SDK is updated to the latest version.
- Exception Handling: Wrapped the
serialize()
call in ado-catch
block to handle exceptions. - Data Integrity: Verified that the data within
sbMessageRef
is not corrupted before callingserialize()
.
Despite these efforts, the crash persists.
Request:
- Has anyone else experienced this issue with the
serialize()
function? - Are there any additional steps or configurations recommended to prevent this crash?
- Is there a specific version of the SDK that addresses this issue more robustly?
Any help or insights from the community would be greatly appreciated. Thank you!