I have written Log helper class which has couple of Log functions. All is working well in DEBUG mode. But when I run my code is release mode it is crashing. Below is the code snippet:
+ (void)info:(NSString *)format, ...
{
va_list args;
va_start(args, format);
va_end(args);
NSString *formatedMessage = [[NSString alloc] initWithFormat:[NSString stringWithFormat:@"INFO %@",format] arguments:args];
}
While creating formatedMessage app is getting crash with below excecption:
If I set
Build Setting->optimization level to NONE
in Release mode all works smooth. Any idea to fix with Optimization Level to
Fastest-Smallest
in Release mode