I have one method in which there is one condition which checks the bool value and do some task based on the condition. It is working perfectly in the debug build but in the release build the bool value always return true.
Below is sample code of the method which is behaving differently in debug and release version.
-(void)addNotification:(NSMutableDictionary *)dictNotificationData
{
BOOL addNotification;
if ([[dictNotificationData objectForKey:@"id"] integerValue] == 2) {
if ([[dictNotificationData objectForKey:@"isActive"] boolValue]) {
addNotification = YES;
}
}
else {
addNotification = NO;
}
//In the release version this value always return true eventhough it is going in the else part.
if (addNotification) {
//code for local notification
}
}
Please let me know if any one has any idea about why it is behaving differently in debug and release version.