-
Notifications
You must be signed in to change notification settings - Fork 239
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
🐞Type 'WorkmanagerPlugin' has no member 'registerBGProcessingTask' and Type 'WorkmanagerPlugin' has no member 'registerPeriodicTask' #551
Comments
You may try to change the branch of the package in pubspec.yaml file:
It may help you to solve your issue at this moment. |
The above solution seems to work, I'm now able to build the app and triggering the background task from the debugger works. Could we get a comment whether this is the "correct" solution for making this plugin work on iOS at the moment? |
I got the same error !! |
Don't you think that it's weird? The official git link is |
I could have elaborated a bit, those changes from (or that is how I understood the situation) |
I spend too much time figuring out why the described setup is not working with my project until I realized that the link to the iOS Setup brings you to the GitHub Repo, has a different version than the one that is published on pub.dev 🥲 Pubspec workmanager:
git:
url: https://github.com/fluttercommunity/flutter_workmanager.git
ref: b783000 |
I am now using this version instead of the 0.5.2 version and at first it worked fine, but now I get an error on Android:
I really need the periodic tasks to work on iOS, so I hope someone can help me with this since they don't work in the 0.5.2 version. |
Hi, try adding this line inside the dependencies array found in /android/app/build.gradle:
|
Version
Describe the error
I was following the setup for iOs and when reaching the "You MUST amend your AppDelegate.swift and Info.plist file to register your task ID." I receive those errors in Xcode.
I have cloned this repo and the same errors show on the example (on the flutter side there are 4 errors like: error: The method 'registerProcessingTask' isn't defined for the type 'Workmanager'. (undefined_method at [workmanager_example] lib/main.dart:266)
Output of
flutter doctor -v
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.4.1 23E224 darwin-arm64, locale en-US)
• Flutter version 3.19.6 on channel stable at ~/software/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (7 days ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at ~/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: ~/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] Android Studio (version 2023.3)
• Android Studio at ~/Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.1)
• IntelliJ at /Applications/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.88.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.84.0
[✓] Connected device (4 available)
• Pixel 8 (mobile) • 39011FDJH007KM • android-arm64 • Android 14 (API 34)
• iPhone 15 Pro (mobile) • 195714BD-9F6E-47A9-9886-313A3A97FC68 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.4.1 23E224 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 124.0.6367.62
[✓] Network resources
• All expected network resources are available.
The text was updated successfully, but these errors were encountered: