I have an application that saves images to a custom album in a camera frame through
[library writeImageToSavedPhotosAlbum:[newTestImage CGImage] metadata:metadata completionBlock:^(NSURL *assetURL, NSError *error) {
This works great, however, I would like the user to be able to share these images from the application, I did it through
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: ^{
However, while the image is deprived of all exif data, is there a way to implement the same functionality, but save the metadata? Thanks so much for any help.
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]; }];
peten source share