Page 1 of 1

How do I turn off all the logging on the iphone client?

Posted: 04 Feb 2011, 20:51
by intomo
How do I turn off all the logging on the iphone client? Is there a way to turn it all off? Thanks.

Answer for your query

Posted: 09 Feb 2011, 04:04
by rahulvyas
There is a variable named _debug in INFSmartFoxiPhoneClient.h

Create a property of that variable like this

@property (assign) BOOL debug;

@synthesize debug in .m file

and where you start your connection modify the code to disable debugging

Here is the code snippet of mine.

Code: Select all

//Connects to Smart Fox Server
- (void)connectToSFSServer {
	
	// Initialize sfs server connection
	self.smartFox = [[INFSmartFoxiPhoneClient iPhoneClient:YES delegate:self] retain];
	
#if EnableSFSLogging > 0
	//Enable debug messages
	[self.smartFox setDebug:YES];
#else
	//Disable debug messages
	[self.smartFox setDebug:NO];
#endif
	
	[INFSmartFoxObjectSerializer setDebug:YES];
	[self.smartFox loadConfig:@"config" autoConnect:YES];
}