This is the error I get when I try and compile my project:
Undefined symbols for architecture armv7:
"_writeImageToSavedPhotosAlbum", referenced from:
-[AddNewPhotoViewController imagePickerController:didFinishPickingMediaWithInfo:] in AddNewPhotoViewController.o
I get the error when calling writeImageToSavedPhotosAlbum. I suspect the error is to do with not importing the necessary frameworks, but I don’t know what to import.
Any help?
EDIT
Here’s my writeImageToSavedPhotosAlbum code:
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
// Access the uncropped image from info dictionary
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
[self dismissModalViewControllerAnimated:YES];
[_CameraOutput setImage:image];
writeImageToSavedPhotosAlbum(image, nil, @selector(image:didFinishSavingWithError:contextInfo:));
}
EDIT #2
I had included the following import in my .m file:
#import <AssetsLibrary/AssetsLibrary.h>
writeImageToSavedPhotosAlbumis a method ofALAssetsLibrary, you must do something like