All changes
ImprovedFlutter SDKFlutter SDK v0.4.0

Flutter SDK 0.4.0 keeps devices registered and recovers by itself

Flutter SDK 0.4.0 re-registers each device once a day and registers again by itself when the server no longer knows the device.

Your app's devices now stay reachable with no extra code:

  • Daily check-in. The SDK registers the device at least once every 24 hours, even when nothing changed. This keeps the push token fresh, so PushFire does not treat a device in use as expired.
  • Recovery from a deleted device. If your server removed the device or erased its subscriber, the next SDK call that gets "device not found" registers the device again and retries once. If the recovery fails, the SDK waits before it tries again.
  • Session follows the server. If PushFire moved the device to another subscriber, for example after an erase, the SDK clears the cached subscriber and emits onSubscriberLoggedOut. It does not log in again by itself.
  • Clearer errors. PushFireApiException.code now holds the API's error code, such as device_not_found. New helpers: isDeviceNotFound and isSubscriberDeviceNotFound.
  • Safer logout. logoutSubscriber() no longer throws when the device is already detached from the subscriber.
  • Fix. Automatic login and logout from the Firebase Auth or Supabase Auth listener no longer cause an uncaught error.

Update the package:

PushFire Flutter SDK 0.4.0: automatic device recovery | PushFire