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

Background Fetch block silent notifications on iOS #1390

Open
kukareku0307 opened this issue Dec 6, 2024 · 1 comment
Open

Background Fetch block silent notifications on iOS #1390

kukareku0307 opened this issue Dec 6, 2024 · 1 comment
Labels

Comments

@kukareku0307
Copy link

kukareku0307 commented Dec 6, 2024

Your Environment

  • Plugin version: 4.16.5
  • Platform: iOS
  • OS version: 17 && 18
  • Device manufacturer / model: iPhone
  • Flutter info (flutter doctor):
  • Plugin config:
 no config on iOS

Expected Behavior

Plugin do not block silent notifications in method:

override func application(_ application: UIApplication,
                              didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
                              ***
    }

Actual Behavior

When app gets silent push notification ("aps": {
"content-available": 1
},), then i see logs:

-BackgroundFetch AppDelegate received fetch event
-[TSBackgroundFetch performFetchWithCompletionHandler]
-[TSBackgroundFetch scheduleBGAppRefresh] com.transistorsoft.fetch
-[TSBackgroundFetch] BGTaskScheduler failed to register fetch-task and will fall-back to old API. This is likely due to running in the iOS Simulator (Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)")

And my method didReceiveRemoteNotification is not called.
Now I use this plugin only for android, but issue is getting on iOS.
If i remove plugin method is called

Steps to Reproduce

  1. install plugin
  2. put breakpoint on didReceiveRemoteNotification method
  3. send silent push notification to your device
  4. make sure that the method is not called

Context

Debug logs

Logs
BackgroundFetch AppDelegate received fetch event
[TSBackgroundFetch performFetchWithCompletionHandler]
[TSBackgroundFetch scheduleBGAppRefresh] com.transistorsoft.fetch
[TSBackgroundFetch] BGTaskScheduler failed to register fetch-task and will fall-back to old API.  This is likely due to running in the iOS Simulator (Error Domain=BGTaskSchedulerErrorDomain Code=1 "(null)")
Copy link

github-actions bot commented Jan 6, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant