Skip to content

path_provider_watchos 0.1.1: upstream's example and test, and iOS's behaviour - #26

Merged
MAUstaoglu merged 1 commit into
mainfrom
examples-path-provider
Oct 24, 2026
Merged

MAUstaoglu merged 1 commit into
mainfrom
examples-path-provider

Conversation

@MAUstaoglu

Copy link
Copy Markdown
Member

Part of #24.

Example. Our example was a hand-written demo, and its integration test a copy of upstream's "trimmed to the directories that exist on watchOS". AUTHORING.md §3 asks for upstream's own example and official test, unchanged. Both are now path_provider's, ported with flutter-watchos plugin port --include-example. The only change is the formatting our CI checks, and there are no watchOS deviations.

Implementation. Upstream's test found two gaps, fixed in the implementation as §3 asks:

  • getDownloadsPath threw UnimplementedError. It now returns the user-domain NSDownloadsDirectory path, the same lookup path_provider_foundation makes on iOS, through a new FFI export, path_provider_watchos_downloads_path.
  • The external storage getters threw UnimplementedError. They now throw UnsupportedError, as on iOS.

Verified

  • watchOS 27.0 Simulator: all 16 of upstream's tests pass, including the Downloads path and the three UnsupportedError cases. The new .m code compiles in that build.
  • The example starts with no exception in its first 15 seconds and no overflow stripe.
  • Unit tests cover the new getter and the UnsupportedError cases (for every StorageDirectory). flutter analyze lib test is clean.
  • The repo's version, symbol, example-constraint, README-snippet, test-name, word and format checks pass. pub publish --dry-run raises no other warning.

Version 0.1.1 with a CHANGELOG entry. The README and PORTING_REPORT (verification status, Example section, interface coverage) are updated.

…ehaviour

The example was a hand-written demo, and its integration test a copy of
upstream's "trimmed to the directories that exist on watchOS". AUTHORING.md
§3 asks for upstream's own example and official test, unchanged, so both are
now path_provider's, ported with `flutter-watchos plugin port
--include-example` (#24).

Upstream's test then showed two gaps, fixed in the implementation as §3
asks:
- getDownloadsPath threw UnimplementedError. It now returns the user-domain
  NSDownloadsDirectory path, the lookup path_provider_foundation makes on
  iOS, through a new FFI export, path_provider_watchos_downloads_path.
- The external storage getters threw UnimplementedError. They now throw
  UnsupportedError, as on iOS.

On the watchOS 27.0 Simulator all 16 of upstream's tests pass, and the
example starts with no exception in its first 15 seconds and no overflow.
@MAUstaoglu
MAUstaoglu merged commit 2158cfa into main Oct 24, 2026
2 checks passed
@MAUstaoglu
MAUstaoglu deleted the examples-path-provider branch October 24, 2026 19:03
@MAUstaoglu

Copy link
Copy Markdown
Member Author

Re-checked the example's start the way spec 0006 criterion 8a asks: built with --dart-define=flutter.inspector.structuredErrors=false, so framework errors such as an overflow reach the log, and read both the console and the unified log for the first 15 seconds. The first check lacked that flag. Result on the watchOS 27.0 Simulator: no exception and no overflow, so the claim above holds.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant