File config name: sfs—config.xml
The content's config file:
Code: Select all
<SmartFoxConfig>
<!-- Mandatory Settings -->
<ip>127.0.0.1</ip>
<port>9933</port>
<zone>BasicExamples</zone>
<!-- End Mandatory Settings -->
<debug>false</debug>
<httpPort>8080</httpPort>
<useBlueBox>false</useBlueBox>
<blueBoxPollingRate>500</blueBoxPollingRate>
</SmartFoxConfig>
and:
Code: Select all
NSString *pathConfig = [[NSBundle mainBundle] pathForResource:@"sfs-config" ofType:@"xml"];
smartFox2XClient = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:YES delegate:self];
[smartFox2XClient loadConfig:pathConfig connectOnSuccess:NO];
callback from Smartfox:
Code: Select all
-(void) onConfigLoadSuccess:(SFSEvent *)evt
{
NSLog(@"evt: %@", evt);
NSLog(@"Config file loaded, now connecting...");
}
-(void) onConfigLoadFailure:(SFSEvent *)evt
{
NSLog(@"Failed loading config file: %@", [evt.params objectForKey:@"message"]);
}
and my result: "Failed loading config file: (null)"
i don't know What was wrong ? and what should i do ? Please help me, thanks you.