Nodoid
Nodoid

Reputation: 1571

Access image filenames on iOS

I'm developing an app that will create a list view containing the image filename and a thumbnail of an image (they images will be loaded via lazy loading).

My problem is that from what I've seen, the images should be in /user/data/Media/DCIM but if I try and look at that directory using Directory.Enumerate("/user/data/Media/DCIM") I'm told the directory doesn't exist.

Is there some special way that I can use so I just enumerate the image filenames on the phone?

I'm using Xamarin.iOS for this.

Upvotes: 0

Views: 37

Answers (1)

Jason
Jason

Reputation: 89127

If you want to get the list of images from the device's photo library, you don't access the filesystem directly - instead you use the AssetsLibrary API.

The Shared Resources sample includes code to interact with the Assets Library.

Upvotes: 1

Related Questions