I Found the problem :)
My function that was running every 5 seconds was inside the below code
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,
(unsigned long)NULL), ^(void) {
[self checkNewMessages];
});
When I changed it to the below, it worked like a charm!
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
[self checkNewMessages];
});
});