livekit / client-sdk-swift

LiveKit Swift Client SDK. Easily build live audio or video experiences into your mobile app, game or website.
https://livekit.io
Apache License 2.0
173 stars 84 forks source link

It seems websdk sends chat msg in different format but ios sdk expects differently #381

Open royatanu94 opened 1 month ago

royatanu94 commented 1 month ago

Describe the bug Hi All, It seems websdk sends chat msg in different format but ios sdk expects differently which causes Error in ios sdk "Failed to decode data keyNotFound(CodingKeys(stringValue: "messageId", intValue: nil)" IOS expects: { "text": "Jddj", "senderIdentity": { "stringValue": "nu-ios4" }, "messageId": "B5F97563-A-E2DDE3D8038", "senderSid": { "stringValue": "dddcdc" } }

SDK Version ios sdk 2.0.7, used web for https://meet.livekit.io/?tab=custom

iOS/macOS Version ios 17

Steps to Reproduce

Send data messages from browser to ios device, ios sdk will fail to decode. But works when chat msg is send from ios to browser.

Expected behavior

Data message exchange should work in both way.

Screenshots

image image

Logs DataChannelPairActor.dataChannel(_:didReceiveMessageWith:) dataChannel(didReceiveMessageWith:) Failed to decode data keyNotFound(CodingKeys(stringValue: "messageId", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"messageId\", intValue: nil) (\"messageId\").", underlyingError: nil))