title: Globally declaring a function pointer in Objective C
body: <p>I want to globally declare a function pointer in Objective C. I want to do this because I'm fetching updates for a notification asynchronously, and I'd like the completion handler to be used once all the updates have been received.</p>
  
  <p>The header is declared as follows:</p>
  
  <pre><code>@interface GetStatusUpdate : NSObject 
  {
      void (^)(UIBackgroundFetchResult) completionHandler;    
  }
  
  -(void)getStatusUpdate:(NSDictionary*)details completionHandler:(void (^)(UIBackgroundFetchResult))completionHandle;
  
  @end
  </code></pre>
  
  <p>I'm happy (I think) that I'm passing the completion handler correctly in getStatusUpdate, but the declaration "void (^)(UIBackgroundFetchResult) completionHandler" doesn't compile.</p>
  
  <p>In the interests of completeness, I was going to:</p>
  
  <pre><code>-(void)getStatusUpdate:(NSDictionary*)journeyDetails
       completionHandler:(void (^)(UIBackgroundFetchResult))completionHandle {
  
      completionHandler = completionHandle;
  }
  </code></pre>
  
  <p>Any idea what I'm doing wrong here?  Any suggestions how I might use completion handler 'better' after an asynchronous fetch?</p>