Guest User

Untitled

a guest
Jun 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. @implementation AVAssetExportSession (Testing)
  2.  
  3. - (void) exportSynchronously
  4. {
  5. dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
  6. [self exportAsynchronouslyWithCompletionHandler:^{
  7. dispatch_semaphore_signal(semaphore);
  8. }];
  9. dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
  10. dispatch_release(semaphore);
  11. }
  12.  
  13. @end
Add Comment
Please, Sign In to add comment