I have the problem as the title goes. Are there any restrictions, like \"Export only 3 image per second\", or something like?
for (int frameStepper =
If I log the error of completion, it says:
Error Domain=ALAssetsLibraryErrorDomain Code=-3301 "Write busy" UserInfo=0x69e8e20 {NSLocalizedFailureReason=There was a problem writing this asset because the writing resources are busy., NSLocalizedRecoverySuggestion=Try to write again, NSLocalizedDescription=Write busy}
That means I have to wait for the completition of the running processes by implementing the given callback:
- (void) image: (UIImage *) image
didFinishSavingWithError: (NSError *) error
contextInfo: (void *) contextInfo
Hurray.
A variation of this helped me: http://iphoneincubator.com/blog/tag/uiimagewritetosavedphotosalbum
{
UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
}
- (void)imageSavedToPhotosAlbum:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo {
if (error) {
[self tryWriteAgain:image];
}
}
-(void)tryWriteAgain:(UIImage *)image
{
UIImageWriteToSavedPhotosAlbum(image, self, @selector(imageSavedToPhotosAlbum: didFinishSavingWithError: contextInfo:), nil);
}