Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong parameter decode from ios native make ios crash and some feature not work #167

Open
guopeng1994 opened this issue May 10, 2024 · 1 comment

Comments

@guopeng1994
Copy link

Describe the bug
in method getChannelAttributesByKeys from dart, the attributeKeys was passed as key 'attributeKeys' to native side, but in ios native side, SwiftAgoraRtmPlugin.swift line 237, read keys from wrong key name 'keys', so while unwrapping keys variable, it will always fail and crash, because keys variable is nil all the time

To Reproduce
use the latest version v1.5.9, call getChannelAttributesByKeys method

Expected behavior
not crash

Screenshots

image
image

@guopeng1994 guopeng1994 changed the title wrong parameter decode from ios native make ios crash wrong parameter decode from ios native make ios crash and some feature not work May 16, 2024
@guopeng1994
Copy link
Author

guopeng1994 commented May 16, 2024

found some new bugs.

check these methods in file agora_rtm_client.dart

deleteLocalUserAttributesByKeys
getUserAttributesByKeys2
setChannelAttributes2
addOrUpdateChannelAttributes2
deleteChannelAttributesByKeys2
clearChannelAttributes2

the function parameters in dart side was 'attributeKeys',or 'option', but ios native side (SwiftAgoraRtmPlugin.swift) was decoded as 'keys' and 'options', so that makes the attributes with options enableNotificationToChannelMembers true not work, and onAttributesUpdated callback never get called.

please check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant