Creating SmartFox client instance with ConfigData

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

Moderators: Lapo, Bax

clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Creating SmartFox client instance with ConfigData

Postby clam61 » 18 Oct 2013, 00:18

I have read about the ability to do this (as opposed to loading an XML file) but I dont see a way to do this in the API
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Creating SmartFox client instance with ConfigData

Postby Lapo » 18 Oct 2013, 12:59

You can do as follows:

Code: Select all

_sfs = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:YES delegate:self];

ConfigData *cfg = [[ConfigData alloc] init];
cfg.host = @"127.0.0.1";
cfg.port = 9933;
cfg.zone = @"BasicExamples";

[_sfs connectWithConfig:cfg];


We'll update the documentation with the next release, 1.2.0

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Re: Creating SmartFox client instance with ConfigData

Postby clam61 » 23 Oct 2013, 22:19

awesome. thakns!

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 24 guests