microspaze / FFImageLoading.Maui

FFImageLoading.Maui - Fast & Furious Image Loading for .NET MAUI
MIT License
117 stars 18 forks source link

Maui Multi Project and null ImageService #55

Open hvaughan3 opened 6 days ago

hvaughan3 commented 6 days ago

Description

I created a new Maui multi-project solution and I am unable to get access to IImageService whether via ImageService.Instance or ServiceHelper.GetService<IImageService>(). I tried calling builder.UseFFImageLoading() from the shared project's MauiProgramExtensions, from the Android/iOS project's MauiProgram class,

Steps to Reproduce

  1. Create new Maui multi-project solution.
  2. Add builder.UseFFImageLoading() in as many places as possible (shared, Android, iOS, etc.).
  3. Attempt to access ImageService.Instance or ServiceHelper.GetService<IImageService>()

Expected Behavior

ImageService.Instance and ServiceHelper.GetService<IImageService>() are accessible.

Actual Behavior

ImageService.Instance is null and ServiceHelper.GetService<IImageService>() returns null.

Basic Information

matteocollina commented 4 hours ago

Same issue with iOS