Hello Developer I want to create a a directory inside a Album in iOS using Xamarin form ,I need to use this directory to store all my capture images
Asked
Active
Viewed 218 times
1
-
I'm using xamarin form ,Please provide links for this language related – vivek pawar Sep 22 '21 at 04:35
-
I have try this and its work but I want create a folder inside a albums with my project name and store all images inside this created folder – vivek pawar Sep 22 '21 at 09:03
-
Does this answer your question? [Create folder in custom photo album](https://stackoverflow.com/questions/43117959/create-folder-in-custom-photo-album) – memtha Sep 28 '21 at 23:53
1 Answers
2
You can use PhotoLibrary to manage picture in album.
We can use it through dependencyService in Xamarin.Forms.
Here is a document about it https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introduction
I also create a simple test about creating album in ios:
IOS implement code:
[assembly:Dependency(typeof(CreateAlbumService))]
namespace My_Forms_Test3.iOS
{
public class CreateAlbumService : ICreateAlbumService
{
public void CreateAlbum()
{
PHPhotoLibrary.SharedPhotoLibrary.PerformChanges(() => { PHAssetCollectionChangeRequest.CreateAssetCollection("TestAlbum"); },(issuccess,error)=> { if (!issuccess) Console.WriteLine(error); });
}
}
}
result:

Adrain
- 1,946
- 1
- 3
- 7
-
@Adraina zhua yes I have try this and its work but I want create a folder inside a albums with my project name and store all images inside this created folder – vivek pawar Sep 22 '21 at 09:02
-
check this question https://stackoverflow.com/questions/43117959/create-folder-in-custom-photo-album – Adrain Sep 23 '21 at 05:39