finishWritingWithCompletionHandler not work

19 Views Asked by At

I used AVAssetWriter and AVAssetWriterInput for screen recording. At the end of screen recording, I called a method that said :

     [self.videoInput markAsFinished];
        [self.audioAppInput markAsFinished];
        [self.audioMicInput markAsFinished];
//    [self.assetWriter finishWriting];
    [self.assetWriter finishWritingWithCompletionHandler:^{
        self.assetWriter = nil;
        self.videoInput = nil;
        self.audioAppInput = nil;
        self.audioMicInput = nil;
    }];

Preview of the recorded file cannot be played on the phone. Does anyone have a good solution

When I use finishWriting method, is possible, but not a use finishWritingWithCompletionHandler, is this why?

0

There are 0 best solutions below