title: iPhone : How to call other method from [_assetExport exportAsynchronouslyWithCompletionHandler: ^(void ) { }
body: <p>I am using following code to combine <code>.mp4</code> and <code>.caf</code> into <code>.mov</code>. (Note : I know how to play video so dont give code for that)</p>
  
  <pre><code> AVAssetExportSession* _assetExport = [[AVAssetExportSession alloc] initWithAsset:mixComposition 
                                                                        presetName:AVAssetExportPresetPassthrough];  //AVAssetExportPresetPassthrough 
  
  NSString* videoName = @"export.mov";
  
  NSString *exportPath = [document stringByAppendingPathComponent:videoName];
  NSURL    *exportUrl = [NSURL fileURLWithPath:exportPath];
  NSLog(@"Export : %@",exportUrl);
  
  if ([[NSFileManager defaultManager] fileExistsAtPath:exportPath]) 
  {
      [[NSFileManager defaultManager] removeItemAtPath:exportPath error:nil];
  }
  
  _assetExport.outputFileType = AVFileTypeQuickTimeMovie;//@"com.apple.quicktime-movie";
  NSLog(@"file type %@",_assetExport.outputFileType);
  _assetExport.outputURL = exportUrl;
  _assetExport.shouldOptimizeForNetworkUse = YES;
  </code></pre>
  
  <hr>
  
  <pre><code>[_assetExport exportAsynchronouslyWithCompletionHandler:
   ^(void ) {  
       switch (_assetExport.status) 
       {
           case AVAssetExportSessionStatusCompleted:
               //   export complete 
  
               NSLog(@"Export Complete");
         ------&gt;&gt;&gt; // From Here I want play movie using MPMoviePlayerController.&lt;&lt;&lt;--------- 
  
  
               break;
           case AVAssetExportSessionStatusFailed:
               NSLog(@"Export Failed");
               NSLog(@"ExportSessionError: %@", [_assetExport.error localizedDescription]);
  
               //                export error (see exportSession.error)  
               break;
           case AVAssetExportSessionStatusCancelled:
               NSLog(@"Export Failed");
               NSLog(@"ExportSessionError: %@", [_assetExport.error localizedDescription]);
  
               //                export cancelled  
               break;
  
       }
  
  
   }       
  
   ];
  </code></pre>
  
  <p>So for playing video I called other method <code>[self playVideo]</code> but its not playing. </p>
  
  <p>I am trying to use this approach b'coz <code>[_assetExport exportAsynchronouslyWithCompletionHandler:
       ^(void ) {  }</code> will use other thread to export video. </p>
  
  <p>If I try to call <code>[self playVideo]</code> after the above code. It will not get video b'coz the video is still creating under the above method. </p>
  
  <p>I have also tried to notify from the <code>AVAssetExportSessionStatusCompleted</code> but its not playing video.</p>
  
  <p>So my question is How can I play video from that method? Or How can switch control to main thread so I can play video successfully?</p>