Skip to content

flutter_local_notifications_watchos: on flutter_local_notifications 23 - #42

Open
iamoguzhanarslantas wants to merge 1 commit into
flutterwatch:mainfrom
iamoguzhanarslantas:flutter-local-notifications-watchos-23
Open

iamoguzhanarslantas wants to merge 1 commit into
flutterwatch:mainfrom
iamoguzhanarslantas:flutter-local-notifications-watchos-23

Conversation

@iamoguzhanarslantas

Copy link
Copy Markdown
Contributor

Summary

The weekly "Upstream compatibility" job has failed since flutter_local_notifications 23.0.0. Its only failure is flutter_local_notifications_watchos: pub.dev has 23.0.2, a new major, and the package pinned ^22.3.2. Following the job's instruction ("Check the package against it, then move both"), this checks the package against 23.0.2 and moves it there.

Not verified on a physical Apple Watch. Everything below was checked on the watchOS 27.0 Simulator and on the host.

What 22.3.2 → 23.0.2 changes for this package:

  • Dart API: none for iOS. IOSFlutterLocalNotificationsPlugin has the same members as in 22.3.2; the only new method, canPostPromotedNotifications(), is on AndroidFlutterLocalNotificationsPlugin. flutter_local_notifications_platform_interface 13.0.0 changes only the SDK minimum (Dart 3.12, Flutter 3.44); CI's Flutter 3.47.5 meets it. The rest of 23.0.0 is Android, Windows and Linux.
  • iOS native: one change, in 23.0.2's requestPermissionsImpl. A request that asks for provisional authorization alone is now made instead of answering false without asking, and the system grants it without a prompt. The watch's _requestAuthorization mirrors this: provisional joins the options that count as "something requested".
  • Unchanged: the UNErrorDomain handling from 22.3.2 (still ignored when adding a request; 23.0.0's README documents it).
  • Official integration test: example/integration_test/flutter_local_notifications_test.dart is identical in 22.3.2 and 23.0.2, so it stays as is.

Changes:

  • pubspec.yaml and the example's: flutter_local_notifications: ^23.0.2. tool/upstream_versions.yaml and the README snippet: 23.0.2.
  • _ffi.m (provisional counts), plus the matching comments and docs in _ffi.h, the Dart doc of initialize, README ("Following upstream" no longer says 23.0.0 is in development), PORTING_REPORT and CHANGELOG. The package is staged at 0.0.1 and unpublished, so the 0.0.1 entry gets the bullet.
  • watchos_notifications_test.dart: a new unattended case, a provisional request alone is granted without a prompt. On a fresh install, requestPermissions(provisional: true) answers true and checkPermissions reports provisional. It skips itself when notifications are already allowed, and runs last because the grant stays for the rest of the run.

Verified

On the watchOS 27.0 Simulator (Apple Watch Series 12, 46 mm):

  • watchos_notifications_test.dart, unattended from a fresh install: 3 passed (the launch, show without permission, the new provisional case) and 3 skipped. With 22.3.2's request check put back, the new case fails (Expected: true, Actual: false).
  • The same test with --dart-define=FLNW_PROMPT=true and the prompt allowed: 4 passed, 2 skipped.
  • Upstream's official flutter_local_notifications_test.dart, after allowing the prompt: 5 passed.
  • The example exports every ffiSymbols entry (dyld_info -exports).

On the host:

  • 15 host tests, on 23.0.2 and platform interface 13.0.0.
  • Every tool/ check, dart format as CI runs it, pub publish --dry-run and tool/check_native_sources.sh (Xcode 27.1) are clean.
  • tool/bin/upstream_compat.dart: all 23 packages resolve with their latest upstream on this branch (exit 0), where main fails on this package.

Not verified

  • A physical Apple Watch.
  • Xcode 26: only Xcode 27.1 is installed here. The native job covers it, and the one native change uses UNAuthorizationOptionProvisional, available since watchOS 5.

🤖 Generated with Claude Code

The weekly upstream compatibility job fails on this package alone: pub.dev
has flutter_local_notifications 23.0.2, a new major, and the package named
^22.3.2. Checked against 23.0.2, it moves there:

* The iOS-facing Dart API is 22.3.2's: IOSFlutterLocalNotificationsPlugin
  keeps its members (the new canPostPromotedNotifications is Android's),
  and flutter_local_notifications_platform_interface 13.0.0 only raises
  the SDK minimum to Dart 3.12 and Flutter 3.44, which CI's 3.47.5 meets.
* Upstream's iOS native code has one change, in 23.0.2: a request that
  asks for provisional authorization alone is made, and granted without a
  prompt, instead of answering false. _requestAuthorization counts
  provisional among the options that make a request, as upstream does.
* The UNErrorDomain handling of 22.3.2 is unchanged, and upstream's
  official integration test is identical in both versions.

pubspec.yaml and the example's name ^23.0.2; tool/upstream_versions.yaml
and the README snippet 23.0.2. The header, the Dart doc of initialize, the
README's "Following upstream", PORTING_REPORT and the CHANGELOG (0.0.1,
still unpublished) follow. watchos_notifications_test.dart gets an
unattended case: on a fresh install a provisional request alone answers
true and checkPermissions reports provisional; it fails with the 22.3.2
behaviour.

Checked on the watchOS 27.0 Simulator (Apple Watch Series 12, 46 mm): the
watchOS test unattended from a fresh install (3 passed, 3 skipped), the
same with 22.3.2's request check (the new case fails), with the prompt
allowed (4 passed, 2 skipped), and upstream's official test (5 passed);
the example exports every ffiSymbols entry. 15 host tests on 23.0.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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