Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Where to save a picture in iOS and then to show it in app

$
0
0

Hello,

I have a project for Android and iOS that needs to show a user image and video in a view.

In Android this was simple. I could just get the path using

System.IO.Path.Combine(Android.OS.Environment.ExternalStorageDirectory.AbsolutePath, Android.OS.Environment.DirectoryPictures);

And then I used System.IO to check file existence and finally, show that in the view (shared project).

What should be the equivalent in iOS?

When I plug the target iPhone in a USB port and browse its files, I only see one folder called DCIM which contains some folders with pictures.

Can I use that folder? how can I access it from the iOS project?

I tried with:

System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonPictures);

But it returns an empty string.

Any help, please?

Thanks

Jaime


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>