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
Use content editing input:
asset.requestContentEditingInput(with: PHContentEditingInputRequestOptions()) { (input, _) in let url = input.fullSizeImageURL }
Make sure that the asset is PHAssetMediaType.Image or otherwise it may crash when unpacking an optional.
PHAssetMediaType.Image