Skip to content

_watcher = ESimManager.TryCreateESimWatcher() alway return null #4834

@MrR0990

Description

@MrR0990

Describe the bug

_watcher = ESimManager.TryCreateESimWatcher() alway return null but same code in UWP ,it run normal

Steps to reproduce the bug

` public sealed partial class MainWindow : Window
{
private Microsoft.UI.Windowing.AppWindow? _appWindow;

 public MainWindow()
 {
     this.InitializeComponent();
     MainPage_Loaded();
 }


 

 private void MainPage_Loaded()

 {

     Logger.Log("+++ MainPage_Loaded");


     _context = SynchronizationContext.Current;
     _watcher = ESimManager.TryCreateESimWatcher();

     if (_watcher != null)
     {

         _watcher.Added += (s, ea) => { _eSims[ea.ESim.Eid] = ea.ESim; };

         _watcher.EnumerationCompleted += EsimEnumerationCompleted;

         _watcher.Start();

     }
     else
     {
         Logger.Log("cannot create eSIM watcher");
     }

 }`

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions