Skip to content
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

[release/6.0-rc1] PhysicalFileProvider: Use active polling instead of FileSystemWatcher on iOS/tvOS #58165

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 26, 2021

Backport of #58142 to release/6.0-rc1

/cc @akoeplinger

Customer Impact

In #57931 a customer reported that the FSEventStream APIs which are used to implement System.IO.FileSystem.Watcher aren't allowed on the App Store.
According to Apple's docs these APIs are only supported on macOS and Mac Catalyst.

Mark System.IO.FileSystem.Watcher as unsupported on iOS/tvOS and throw PNSE.
Switch PhysicalFileProvider to use active polling instead, like we do for Browser.

Without this PR any app that references System.IO.FileSystem.Watcher will be rejected by the App Store review process.

Testing

Verified that System.IO.FileSystem.Watcher.dll for iOS/tvOS no longer contains any P/Invokes to FSEventStream APIs and Microsoft.Extensions.FileProviders.Physical doesn't use it on these platforms anymore.

Risk

Low, this aligns iOS/tvOS with what we already do for Browser.

Fixes #57931

… on iOS/tvOS

In #57931 we found out that the FSEventStream APIs which are used to implement System.IO.FileSystemWatcher aren't allowed on the App Store.
According to [Apple's docs](https://developer.apple.com/documentation/coreservices/1443980-fseventstreamcreate) these APIs are only supported on macOS and Mac Catalyst.

Mark System.IO.FileSystemWatcher as unsupported on iOS/tvOS and throw PNSE.
Switch PhysicalFileProvider to use active polling instead, like we do for Browser.

Addresses #57931
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Aug 26, 2021

Tagging subscribers to this area: @maryamariyan, @dotnet/area-extensions-filesystem
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #58142 to release/6.0-rc1

/cc @akoeplinger

Customer Impact

Testing

Risk

Author: github-actions[bot]
Assignees: -
Labels:

area-Extensions-FileSystem

Milestone: 6.0.0

@akoeplinger akoeplinger added the Servicing-consider Issue for next servicing release review label Aug 26, 2021
@danmoseley danmoseley added the os-ios Apple iOS label Aug 26, 2021
@akoeplinger
Copy link
Member

Got approval from Tactics via email.

@akoeplinger akoeplinger added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Aug 26, 2021
@akoeplinger akoeplinger merged commit 4ebbb8e into release/6.0-rc1 Aug 26, 2021
@akoeplinger akoeplinger deleted the backport/pr-58142-to-release/6.0-rc1 branch August 26, 2021 19:52
@ghost ghost locked as resolved and limited conversation to collaborators Sep 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Extensions-FileSystem os-ios Apple iOS Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants