shinyorg / shiny

.NET Framework for Backgrounding & Device Hardware Services (iOS, Android, & Catalyst)
https://shinylib.net
MIT License
1.44k stars 227 forks source link

net8.0 support for Maui #1394

Closed lancer1977 closed 7 months ago

lancer1977 commented 7 months ago

Summary

I want to use this library in my Maui app but I have a lot of code within the Maui project that has unit tests that run on it. I haven't figured out a way to execute unit tests against platforms without running the platform explicitly, and it kind of defeats the purpose of Unit Testing. I haven't had a chance to look into the code to see how "easy" this would be, but would be invaluable to my project if we can get it supported.

API Changes

net-8.0 compatibility, I understand that this is platform specific libraries but I think fakes would be sufficient. Something to the effect if someone tried to access Shiny code outside of a platform an exception would throw regarding that its not supported outside of platforms.

Intended Use Case

Unit testing Maui code.

Code of Conduct

aritchie commented 7 months ago

I'm not really sure what you're requesting. All of the modules support base net8.0 and have interfaces for the services already.

lancer1977 commented 7 months ago

Thanks for the prompt response. So I'm trying to integrate Push Notifications into a port I'm working on to Maui for iOS and Android but unit tested with net-8.0, Shiny.Hosting.Maui, Shiny.Extensions.Configuration, maybe others dont list dependencies for net8.0 (plain).

If I attempt to compile with them I get errors such as this:

Error NU1202 Package Shiny.Extensions.Configuration 3.2.4 is not compatible with net8.0 (.NETCoreApp,Version=v8.0). Package Shiny.Extensions.Configuration 3.2.4 supports:

aritchie commented 7 months ago

Shiny.Hosting.Maui has no direct functionality so compiler flag the UseShiny out

Shiny.Extensions.Configuration is an implementation of IConfiguration from Microsoft.Extensions.Configuration

NishiokaTakeo commented 5 months ago

Same problem. It sounds like Shinylibrary only supports Device Unit testing? I want to make unit test on non-device.

aritchie commented 5 months ago

@NishiokaTakeo

The package named "Shiny" is 2.7.x and no longer used.

The rest of the packages listed above have been answered.