I have an app which saves images to a custom album within the camera roll via
[library writeImageToSavedPhotosAlbum:[newTestImage CGImage] metadata:metadata
completionBlock:^(NSURL *assetURL, NSError *error) {
//error
}
];
This works fine, however, I would then like to allow the user to share these images from within the app, I was doing it via
ALAsset *assetToShare = self.images[indexPath.row];
NSString *stringToShare = @"…..";
NSArray *dataToShare = @[assetToShare, stringToShare];
UIActivityViewController *activityVC = [[UIActivityViewController alloc]
initWithActivityItems:dataToShare applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion: ^{
//Some Expression
}];}
However in doing so the image is stripped of all exif data, is there a way I can implement the same functionality but retain the metadata? Thanks very much for any assistance.
Edit: Code used to enter ALAssets
if ([[group valueForProperty:ALAssetsGroupPropertyName] isEqualToString:@"my pics"]) {
[self.assetGroups addObject:group];
_displayArray = [self.assetGroups objectAtIndex:0]; ...}];
Then:
[_displayArray enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) {
if (result) {
[self.images addObject:result]; }];
Have you tried something like this? Just passing the actual image.