This is the method that have the image data, that image will than write to camera roll
CGImageRef cgImageResult = [self newSquareOverlayedImageForFeatures:features
inCGImage:srcImage
withOrientation:curDeviceOrientation
frontFacing:isUsingFrontFacingCamera];
if (srcImage)
CFRelease(srcImage);
CFDictionaryRef attachments = CMCopyDictionaryOfAttachments(kCFAllocatorDefault,
imageDataSampleBuffer,
kCMAttachmentMode_ShouldPropagate);
[self writeCGImageToCameraRoll:cgImageResult withMetadata:(id)attachments];