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
Install example app, setup Pusher presence channel.
Connect to Pusher presence channel
Bind to pusher:member_added / pusher:member_removed
Expected behavior
Member data returned when these two pusher events are bound.
Actual behavior
No response on iOS. Pusher SDK recommends passing onMemberAdded and onMemberRemoved callbacks when the presence channel is bound on iOS.
Any improvements you suggest
No it's a good package overall. Member added / member removed works on Android, but I would suggest transforming the data to a JSON payload. It comes as a Java List string and is difficult to parse. Here is how I parsed it:
channel.bind('pusher:subscription_succeeded', (members) {
if(Platform.isAndroid) {
var users = [];
String str = members.data.toString();
String regexString =r'(?<=\{)(.*?)(?=\})';
RegExp regExp =newRegExp(regexString);
var matches = regExp.allMatches(str);
matches.forEach((element) {
String jsonString ="{"+element.group(0)+"}";
var user =jsonDecode(jsonString);
print(user.toString());
});
} else {
// ... IOS payload works fine.
}
});
...
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Expected behavior
Member data returned when these two pusher events are bound.
Actual behavior
No response on iOS. Pusher SDK recommends passing
onMemberAdded
andonMemberRemoved
callbacks when the presence channel is bound on iOS.Any improvements you suggest
No it's a good package overall. Member added / member removed works on Android, but I would suggest transforming the data to a JSON payload. It comes as a Java List string and is difficult to parse. Here is how I parsed it:
...
The text was updated successfully, but these errors were encountered: