-
Notifications
You must be signed in to change notification settings - Fork 256
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
🐞Tasks do not run on iOS at all #521
Comments
@SticksDev are you still getting the error? if so, then what other versions of ios did you test it? |
iOS 17.0.3 and I used your demo app, which also did not work. |
Hello I have the same problem. Background task are running on IOS only if Workmanager is initialized in debug mode = true. Workmanager().initialize(callbackDispatcher, isInDebugMode: true); If isInDebugMode = false. Does not start. |
I do register the oneOffTask with static method like this. On Android works. but on IOS not. |
Any updates? |
I am not able to use it as well. I follow documentation in details, I even created a new project just to test this package only. BGTaskScheduler works if I triggered by Background Fetch won't work or throw any erros (trying to trigger it by Xcode>debug>Simulate Background Fetch) I have:
background_service.dart:
AppDelegate.swift:
Info.plist:
Am I missing something? Documentation does not seem quite up to date... |
I moved to this PR and it seems to be working for me now #511 |
Commenting now on multiple issues while debugging the issue with plugins on iOS background isolates, but it finally seems that the missing piece was this: // AppDelegate.swift
GeneratedPluginRegistrant.register(with: self)
WorkmanagerPlugin.setPluginRegistrantCallback { registry in
GeneratedPluginRegistrant.register(with: registry)
} With the above added (after I did not find this documented anywhere, I'll try to find a suitable place from the official README. |
It worked. |
It worked, thank u |
Version
Describe the error
I have followed all of the setup steps, run the command in the debugger, and nothing happens. No errors, just the task does not get triggered at all. I both have the
@pragma('vm:entry-point')
on my task handler and listen for both the name and the iosbackroundtask enum. My initial print doesn't even get logged either...Ideas? Is This a possible bug? Thanks.
Output of
flutter doctor -v
The text was updated successfully, but these errors were encountered: