Skip to content

Microsoft.Storage.ApplicationData API Spec#4056

Merged
DrusTheAxe merged 9 commits intomainfrom
user/drustheaxe/appdata-spec
Jan 30, 2024
Merged

Microsoft.Storage.ApplicationData API Spec#4056
DrusTheAxe merged 9 commits intomainfrom
user/drustheaxe/appdata-spec

Conversation

@DrusTheAxe
Copy link
Copy Markdown
Member

@DrusTheAxe DrusTheAxe commented Jan 2, 2024

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.

@DrusTheAxe DrusTheAxe added the area-ApplicationData Topics related to ApplicationData APIs in the Microsoft.Windows.Storage namespace label Jan 2, 2024
@DrusTheAxe DrusTheAxe added this to the 1.5 milestone Jan 2, 2024
@DrusTheAxe DrusTheAxe self-assigned this Jan 2, 2024
@DrusTheAxe DrusTheAxe marked this pull request as ready for review January 11, 2024 18:21
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
Comment thread specs/applicationdata/ApplicationData.md Outdated
@kythant
Copy link
Copy Markdown
Contributor

kythant commented Jan 17, 2024

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Copy link
Copy Markdown
Member Author

@DrusTheAxe DrusTheAxe left a 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

Comment thread specs/applicationdata/ApplicationData.md Outdated
Comment thread specs/applicationdata/ApplicationData.md
@DrusTheAxe
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@DrusTheAxe DrusTheAxe enabled auto-merge (squash) January 27, 2024 23:47
@DrusTheAxe DrusTheAxe merged commit f8749d8 into main Jan 30, 2024
@DrusTheAxe DrusTheAxe deleted the user/drustheaxe/appdata-spec branch January 30, 2024 15:43

## 3.3. Reliable access

`Windows.Storage.ApplicationData.Current` only works for packaged apps **running in an
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@riverar riverar Dec 24, 2024

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 use Windows.Storage.ApplicationData.
  • Unpackaged applications should stick to classical methods.

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

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. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ApplicationData Topics related to ApplicationData APIs in the Microsoft.Windows.Storage namespace

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants