title: How to open/create UIManagedDocument synchronously?
body: <p>As mentioned in title, I would like to open <code>UIManagedDocument</code> synchronously, i.e, I would like my execution to wait till open completes. I'm opening document on mainThread only.</p>
  
  <p>Current API to open uses block </p>
  
  <pre><code>[UIManagedDocument openWithCompletionHandler:(void (^)(BOOL success))];
  </code></pre>
  
  <p>Locks usage mentioned at <a href="http://omegadelta.net/2011/05/10/how-to-wait-for-ios-methods-with-completion-blocks-to-finish/" rel="nofollow">link</a> works well on threads other than main thread. If I use locks on <code>mainThread</code>, it freezes execution of app.</p>
  
  <p>Any advice would be helpful. Thanks.</p>