title: Sync version of async method in Obj-C
body: <p>What's the best way to make a synchronous version of an asynchronous method in Objective-C (for iOS, in case it matters)?</p>
  
  <p>Say you have a class with these two methods:</p>
  
  <pre><code>- (void) asyncDoSomething; // Starts an asynchronous task. Can't be changed.
  - (void) onFinishDoSomething; // Called when the task is finished 
  </code></pre>
  
  <p>How would you implement a synchronous <code>doSomething</code> that does not return until the task is finished?</p>