According to Show Confirm Dialog When User Close UWP App, i used namespace "rescap" in my UWP app.
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">
......
<Capabilities>
<Capability Name="internetClientServer"/>
<Capability Name="privateNetworkClientServer"/>
<Capability Name="internetClient"/>
<rescap:Capability Name="confirmAppClose" />
</Capabilities>
</Package>
But now i can not pass the "Windows App Certification Kit - Test"
How can i pass this test without removing this "Restricted namespace"?
How can i pass this test without removing this "Restricted namespace"?
I'm afraid you can't pass the test with removing Restricted namespace. Derive from this document Restricted capabilities, which require approval for Microsoft Store submission and/or are generally only available to Microsoft and certain partners. This error will not effect your build a package, but when you publish store, you must provide info during the app submission process in order to be approved to publish the app to the Microsoft Store.
For more information, please refer Restricted capabilities.