Skip to content

flutter_local_notifications_watchos: on flutter_local_notifications 23 - #42

Merged
MAUstaoglu merged 1 commit into
flutterwatch:mainfrom
iamoguzhanarslantas:flutter-local-notifications-watchos-23
Nov 18, 2026
Merged

MAUstaoglu merged 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>

@MAUstaoglu MAUstaoglu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iamoguzhanarslantas, this is a careful move to 23. I diffed upstream 22.3.2 against 23.0.2 (and 23.0.3, released today): the only iOS change is the provisional guard in requestPermissionsImpl, and your _requestAuthorization change matches it exactly. The 23.0.3 Gregorian-calendar fix is already how this package builds calendar triggers, so ^23.0.2 covers it. Nothing here blocks the merge.

Small follow-ups, fine in a later PR:

  • PORTING_REPORT ("the suite asks for nothing, so it cannot hang") and the header of watchos_notifications_test.dart are no longer quite true: the unattended run now asks for provisional authorization. It still cannot hang, since no prompt is shown, so the wording just needs that.
  • After your new case grants provisional, a later unattended run on the same install still runs "show completes without permission", but the add now succeeds and the UNErrorDomain path is not exercised. Skipping that case when isProvisionalEnabled is set would keep it honest.
  • The header of tool/upstream_versions.yaml dates every version to September/October; a clause for flutter_local_notifications (as the Firebase move did) would keep it accurate.
  • Optional: in the CHANGELOG, "granted without a prompt" holds only while the user has not yet decided.

I haven't run it on a simulator or a watch myself; the review is of the code against upstream.

@MAUstaoglu
MAUstaoglu merged commit 6ed27ee into flutterwatch:main Nov 18, 2026
4 checks passed
MAUstaoglu added a commit that referenced this pull request Nov 20, 2026
…followups

flutter_local_notifications_watchos: follow-ups from the review of #42
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.

2 participants