SubscribeRoomGroupRequest doesn't work

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

Post Reply
joha
Posts: 8
Joined: 22 May 2013, 04:56

SubscribeRoomGroupRequest doesn't work

Post by joha »

SubscribeRoomGroupRequest is returning that the group doesn't exist although I can see the group in the admin.
SmartFox.roomManager getRoomGroups also returns only the 'default' group.
How can I suscribe to the group? The objective-c client I'm using is the last version.
Thanks
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SubscribeRoomGroupRequest doesn't work

Post by Lapo »

There are two fields in the Zone Configurator to define groups.
Public Room Groups: here you must specify all names of Room groups that clients will be able to subscribe to
Default Room Groups: here you can specify one ore more room group that you want the User to be subscribed to as soon as he joins the Zone.

Are you sure the groups you are requesting from client side is present in the first field I mentioned?
If so can you please report exactly what errors do you get on the client?
Also, can you please check for errors on the server side once you send the request?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
joha
Posts: 8
Joined: 22 May 2013, 04:56

Re: SubscribeRoomGroupRequest doesn't work

Post by joha »

This is the server log:

com.smartfoxserver.v2.exceptions.SFSException: Invalid client group subscription: GroupC, User: jmoccetti1
com.smartfoxserver.v2.controllers.system.SubscribeRoomGroup.execute(SubscribeRoomGroup.java:60)
com.smartfoxserver.v2.controllers.SystemController.processRequest(SystemController.java:130)
joha
Posts: 8
Joined: 22 May 2013, 04:56

Re: SubscribeRoomGroupRequest doesn't work

Post by joha »

seems only works with groups created in the admin and after restart the server
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: SubscribeRoomGroupRequest doesn't work

Post by Lapo »

Yes, that's exactly how it works.
Groups cannot be created by the client. If you want to create new groups dynamically you can do that on the server side by creating a Group and assigning it to a new group name.

Anyways for the client to be able to subscribe to new groups it is necessary to declare them in the Default Groups
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply