Hi
I was trying to get file stream by using the photokit framework on Xamarin.IOS.
PHFetchResult fetchResults = PHAsset.FetchAssets(PHAssetMediaType.Image, null);
for (int i = 0; i < fetchResults.Count; i++)
{
//fetching Result
PHAsset phAsset = (PHAsset)fetchResults[i];
String fileName = (NSString)phAsset.ValueForKey((NSString)"filename");
PHImageManager.DefaultManager.RequestImageData(phAsset, null, (data, dataUti, orientation, info) => {
var path = (info?[(NSString)@"PHImageFileURLKey"] as NSUrl).FilePathUrl;
Stream stream = System.IO.OpenRead((String)path);
});
But It returned to the FileNotFoundException.
Please help me to get file stream.
Thanks