Can a UWP App access data outside its own app data, publisher data, or what the user picks with the FilePicker?

softwareengineering.stackexchange https://softwareengineering.stackexchange.com/questions/366641

  •  30-01-2021
  •  | 
  •  

Frage

Can a UWP App access data outside its own app data, publisher data, or what the user picks with the FilePicker?

As far as I can tell, a shared publisher area and a user prompt with the FilePicker are the only ways to access files outside a UWP app's own personal app data stores. Registry settings are sandbox'd, as are environment variables.

I'd like to pass data from one UWP app to another as plain-text non-executing and read-only if it's possible, but it doesn't seem like it is so far from my research. Have I missed anything?

War es hilfreich?

Lösung

This changed with the 1803 release of Windows 10. You need to request the permission broadFileSystemAccess in your manifest.

The documentation is here: https://docs.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations

Andere Tipps

According to this reference you might be able to use the Downloads Folder for this purpose.

You can declare more access required using App Capability Declarations to expand your UWP sandbox. Just know that anything beyond the small default sandbox requires the user to acknowledge your app is requesting those features. The user can opt to disallow access.

The App Capability Declarations can allow you access to specific types of data (Music, Pictures, Video), all files on the file system, or specific devices. As a user I would request that you try to limit your access to whatever is truly needed and defensible.

Lizenziert unter: CC-BY-SA mit Zuschreibung
scroll top