I have a photo I want my user to be able to share on Instagram and I need to get the local file directory of the photo.
However I am fetching my images as a PHAsset (not
PHAsset *asset = YOUR_ASSET;
PHImageManager *manager = [PHImageManager defaultManager];
PHImageRequestOptions *options = [PHImageRequestOptions new];
options.synchronous = YES;
options.deliveryMode = PHImageRequestOptionsDeliveryModeHighQualityFormat;
options.resizeMode = PHImageRequestOptionsResizeModeNone;
options.networkAccessAllowed = NO;
[manager requestImageForAsset:YOUR_ASSET targetSize:PHImageManagerMaximumSize contentMode:PHImageContentModeDefault options:options resultHandler:^(UIImage *resultImage, NSDictionary *info){
NSURL *filePath = [info valueForKeyPath:@"PHImageFileURLKey"]
}];