You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's fantastic that you have put this together as I am also looking for a plugin to use Sendbird with flutter. I am an absolute newbie with both Kotlin and Swift and I have been trying to adapt your code to be able to extract groupchannel metadata, however all me attempts so far have failed. For example in the
/ios/Classes/SendBirdUtils.swift
file I have tried to include the following code in the extractChannel function to extract the channel metadata:
var channelMetadata = [String: String]() channel.getAllMetaData { (metaData, error) in guard let extraData = metaData, error == nil else { if let error = error { print("error retrieving metadata: \(error)") return } else { fatalError("error can't be nil") } } channelMetadata = extraData }
I then try to store the one of the keys as so:
js["status"] = channelMetadata["searchCity"]
I have included status in the Flutter channel class, but when I try to access it in flutter I get "null", even though I know it has a value for that channel. Do you have any tips?
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hi guys,
It's fantastic that you have put this together as I am also looking for a plugin to use Sendbird with flutter. I am an absolute newbie with both Kotlin and Swift and I have been trying to adapt your code to be able to extract groupchannel metadata, however all me attempts so far have failed. For example in the
/ios/Classes/SendBirdUtils.swift
file I have tried to include the following code in the extractChannel function to extract the channel metadata:
var channelMetadata = [String: String]() channel.getAllMetaData { (metaData, error) in guard let extraData = metaData, error == nil else { if let error = error { print("error retrieving metadata: \(error)") return } else { fatalError("error can't be nil") } } channelMetadata = extraData }
I then try to store the one of the keys as so:
js["status"] = channelMetadata["searchCity"]
I have included status in the Flutter channel class, but when I try to access it in flutter I get "null", even though I know it has a value for that channel. Do you have any tips?
Thanks in advance
The text was updated successfully, but these errors were encountered: