onAdminMessage in IOS..

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

Moderators: Lapo, Bax

arungaucher
Posts: 3
Joined: 09 Oct 2013, 16:25

onAdminMessage in IOS..

Postby arungaucher » 10 Oct 2013, 14:08

Hii admin..how can i send onAdminMessage through objective c client...

i am using this code but nothing happen,,,


MessageRecipientMode *reciMode=[MessageRecipientMode recipientModeWithMode:MessageRecipientMode_TO_ZONE target:nil];

[smartFox send:[AdminMessageRequest requestWithMessage:@"Hello" recipientMode:reciMode]];


Plz help me...
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: onAdminMessage in IOS..

Postby Lapo » 11 Oct 2013, 10:47

The problem with Moderator or Admin Messages is that the client must have "super powers" in order for the server to accept it, otherwise anyone could send "fake" admin messages.

If you check the server side logs you will notice that an error is thrown each time a mod/admin message request is sent but the client doesn't have permissions.

Check the documentations for all the details about how to elevate permissions here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
arungaucher
Posts: 3
Joined: 09 Oct 2013, 16:25

Re: onAdminMessage in IOS..

Postby arungaucher » 16 Oct 2013, 14:28

okay..thanks for you time......i have one more question....how can get all rooms in my current zone for objective c client..?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: onAdminMessage in IOS..

Postby Lapo » 16 Oct 2013, 14:52

The access to Rooms from the client side is always partial due to limitations in the amount of data that each client can receive.
Normally as you login you will receive all the Rooms available in the default Room Group. If you are using other groups you won't receive any room list about those unless you subscribe to them via the client API.

http://docs2x.smartfoxserver.com/Develo ... chitecture

The SubscribeRoomGroupRequest, allows you to obtain the room list for other Groups that you might have created.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
arungaucher
Posts: 3
Joined: 09 Oct 2013, 16:25

Re: onAdminMessage in IOS..

Postby arungaucher » 17 Oct 2013, 08:01

hii...i know this command PublicMessageRequest for send a message to specific room......

But is there any way to send public message to all rooms...??
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: onAdminMessage in IOS..

Postby Lapo » 17 Oct 2013, 08:22

You can use a ModeratorMessageRequest, check the iOS documentation to see the details. You can choose to send the message to the whole Zone (all Rooms)

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 21 guests