I have to save video to camera roll , video is in the form of nsdata . I know that is the method
UISaveVideoAtPathToSavedPhotosAlbum(videopath, self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
NSLog(@"is error?%@",error);
}
Also tried this but not working for me
NSURL *movieURL = [NSURL fileURLWithPath:self.videoPath];
NSLog(@"movie url== %@",self.videoPath);
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library writeVideoAtPathToSavedPhotosAlbum:movieURL
completionBlock:^(NSURL *assetURL, NSError *error){NSLog(@"complete ");}];
This method accept path not nsdata . what should i do?
here Video path = @"/var/mobile/Applications/AE75E729-7F10-478B-9DAF-E730EB4231D1/Documents/Videos/12.mp4"