Forum Xamarin.iOS

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Fetching images works on simulator but not device

Ryn9011Ryn9011 Member ✭✭
edited October 2020 in Xamarin.iOS

I'm getting all of the videos from a custom album and putting them into a list. The videos at this stage are of type AVAsset (they later get converted into native format and sent to a server)

This all works fine in the iPhone 11 ios14 simulator

but on my iPhone 8 device, it doesn't seem to be working

It's the exact same file (although the file name is different) and album

When inspecting the AVAsset that is added to the list, the one on the physical device, whilst not empty, is missing the core image data (see screenshot comparison) as when I convert the AVAsset to a native video format, it is 0 bytes

foreach (PHAsset asset in userFetchResults) //userFetchResults is a list of PHFetchResult
{
omitted
else if (asset.MediaType == PHAssetMediaType.Video)
{
NSObject fileName = new NSObject();
manager.RequestAvAsset(asset, videoOptions,
(video, optionParams, handler) =>
{
fileName = asset.ValueForKey((NSString)"filename");
images.Add(new IosImageModel(null, video, asset.CreationDate.ToString(), fileName.ToString(), titles[5]));
//tcs.SetResult(images);
});
}
}

iPhone 8 device:
Screen Shot 2020-10-18 at 5.40.13 PM

emulator:
Screen Shot 2020-10-18 at 5.48.27 PM

Answers

Sign In or Register to comment.