UIImageWriteToSavedPhotosAlbum is only working sometimes. Sometimes it works, sometimes it doesn't, exact same function.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
NSLog(@"Saving image to camera roll...");
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
NSLog(@"Done!"); }
I am using a UIImagePicker controller to get the image that then calls that function.
Sometimes it saves it to the camera roll, other times it simply doesn't.
Anyone has any idea?
Thanks in advance.
Edit:
The completion method for UIImageWriteToSavedPhotosAlbum sometime returns an error of:
wait_fences: failed to receive reply: 10004003
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…