장치가 NSDocumentsDirectory에있는 비디오 파일을 사진 라이브러리에 저장할 공간이 부족한 경우에이 문제가 발생했습니다.기기 라이브러리 iOS에 동영상을 저장 하시겠습니까?
UISaveVideoAtPathToSavedPhotosAlbum은 저장하는 동안 오류를 발생시키지 않습니다. 당신이 표시되지 않는 ALERT_WITH_MESSAGE을 의미하는 경우
UISaveVideoAtPathToSavedPhotosAlbum(session.outputURL.path, self, @selector (video:didFinishSavingWithError:contextInfo:), nil); //session is AVAssetExportSession
- (void)video:(NSString *)videoPath didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo
{
[MBProgressHUD hideHUDForView:self.view animated:YES];
if(error) //else part is executed every time...
{
ALERT_WITH_MESSAGE([@"Your composition could not be saved to your device library. Error: " stringByAppendingString:error.description]);
}
else
{
ALERT_WITH_MESSAGE(@"Your composition has been saved to your device library.");
}
}
먼저 장치에 사용 가능한 공간이 충분한 지 확인하십시오. 그렇다면 필요하지 않으면 다운로드 만 시작하십시오. if (freeSpace> downlaodSize)를 누른다. – Mrunal
나는이 링크 (http://aasims.wordpress.com/2012/02/14/how-to-find-available-disk-space-of-ios-device/)에서 자유 공간을 결정하기 위해이 코드를 사용했다. 나의 기기. 안타깝게도이 장치는 12.2mb를 남기고 코드는 222mb라고합니다. – Nil
확인 http://stackoverflow.com/questions/5310445/check-enough-space-on-iphone-device-before-downloading-files freeSpace = [fileSystemFreeSizeInBytes longValue]; – user3344236