diff --git a/src/Mobile/Controls/Player.xaml.cs b/src/Mobile/Controls/Player.xaml.cs index 393080e..ec87662 100644 --- a/src/Mobile/Controls/Player.xaml.cs +++ b/src/Mobile/Controls/Player.xaml.cs @@ -7,7 +7,7 @@ public partial class Player : ContentView public Player() { InitializeComponent(); - this.playerService = ServicesProvider.GetService(); + this.playerService = this.Handler.MauiContext.Services.GetService(); this.IsVisible = false; } diff --git a/src/Mobile/Services/WifiOptionsService.cs b/src/Mobile/Services/WifiOptionsService.cs index 42a2629..036043c 100644 --- a/src/Mobile/Services/WifiOptionsService.cs +++ b/src/Mobile/Services/WifiOptionsService.cs @@ -2,11 +2,15 @@ public class WifiOptionsService { +#if __MACCATALYST__ + Platforms.MacCatalyst.ConnectivityService connectivity; + public WifiOptionsService(Platforms.MacCatalyst.ConnectivityService connectivity) => this.connectivity = connectivity; +#endif + public async Task HasWifiOrCanPlayWithOutWifiAsync() { #if __MACCATALYST__ - var connectivity = ServicesProvider.GetService(); return await connectivity.IsConnected(); #else if (Config.Desktop)