-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft.Storage.ApplicationData API Spec #4056
Conversation
…rosoft/WindowsAppSDK into user/drustheaxe/appdata-spec
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates per API Review feedback
/azp run |
Azure Pipelines could not run because the pipeline triggers exclude this branch/path. |
|
||
## 3.3. Reliable access | ||
|
||
`Windows.Storage.ApplicationData.Current` only works for packaged apps **running in an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows.Storage.ApplicationData.Current
works for any packaged app, it doesn't require AC, Windows.Management.Core.ApplicationDataManager.CreateForPackageFamily
is for accessing app data for other packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stumbled on this old comment while helping someone and want to clarify:
- Packaged applications running in AppContainer should use
Windows.Storage.ApplicationData
. - Packaged applications not running in AppContainer (e.g., runFullTrust) can use
Windows.Storage.ApplicationDataManager
or classical methods. Do not useWindows.Storage.ApplicationData
. - Unpackaged applications should stick to classical methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@riverar but Windows.Storage.ApplicationData
should work for packaged apps not using AC too, I remember trying it when I made that comment and it was working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it'll only work in some scenarios on a best-effort (not guaranteed) basis; Microsoft has confirmed it's not designed for use outside AC. Just wanted to leave a note to prevent folks from wondering why this is a high-crash API when they roll out to production. 😅
ApplicationData APIs comparable to those in namespaces Windows.Storage and Windows.Management.Core but with additional functionality, improved developer experience and performance optimizations.
Issue #2639
Microsoft-internal tasks 22308619, 30002314, 39401257, 39414843, 40050113 and 48332357.