iOS – Download Facebook data in background with GCD
===

My situation is that every time when my app becomes active I need to sync some data from Facebook. This sync should be made in the background and should not lock the GUI (thus it should not run on the main queue).

So in my `- applicationDidBecomeActive:` method I have this code:

    dispatch_async(dispatch_get_global_queue(0,0), ^{
        
        [[FacebookHelper sharedInstance] syncData];
    });

FacebookHelper is a singleton class that takes care of all Facebook handling. In the FacebookHelper class I have implemented the Facebook delegate methods. But for some reason when I run the above code the Facebook delegate method `- request:didLoad:` (when the Facebook data is finished downloading) is never called. Although if I run the same code with `dispatch_sync` it will finish (but then the GUI will be blocked).