-
Notifications
You must be signed in to change notification settings - Fork 271
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:
|
Anything to help this fixed version being released on pub.dev? |
…inBackgroundTask, printScheduledTasks (#511) * fix:Update Workmanager iOS because no callback in Background on iOS real device, added 30sec BGAppRefresh, Updated example #396 * added permissionhandler an requests for iOS added alert and MaterialApp to workmanager when no iOS permissions activated * fixed errormessage on xcode * feat:Added check for background refresh permissions #441 * text to display task event dates (show prefs) added. * fixed workmanager iOS Part fixed BGProcessing fixed inputdata in callback on task clarified timings * fixed warning dead code and ! check * improved Task description (hints) * Update README.md * Update README.md * Update README.md * Format readme iOS examples * Improve code documentation * Cleanups in SwiftWorkmanagerPlugin.swift * Use logInfo instead of prints and NSLog * Log unnecessary logs only in debug mode * Remove unnecessary logs * Remove isInitalized flag in SwiftWorkmanagerPlugin which was not set to true anywhere * * iOS, Rename registeriOSBackgroundProcessingTask to a generic name registerProcessingTask to be consistent with rest of the plugin and possible future Android implementation * iOS, Rename wrongly named startOnOffTask to startOneOffTask * * Cleanup code to make it more close to original plugin so that change size is reduced and it will make it easy to review * Change new task identifier to be consistent with existing ones e.g. instead of app.workmanager... use be.tramckrijte... * Documentation update * Remove unnecessary logs, comments etc which were added in PRs which were not merged, and cleanup unnecessary code * Revert using a custom log helper OS file to use the plugins existing shared prefs * Bump example flutter sdk to < 4 instead of < 3 * Add task identifiers to iOS AppRefresh and ProcessingTask so that user can define task names instead of using hardcoded names * * iOS AppRefresh task interval should be 15 minutes * Documentation update * Initialize should not auto open App settings if background refresh permission is not assigned. Initialize should return result * Continue work on task identifiers for iOS AppRefresh and ProcessingTask. * Temporarily commented old iOS background fetch * Fix extra commas on iOS * New iOS feature printScheduledTasks to print details of un-executed scheduled tasks. To be used during development/debugging. Format readme to improve readability * iOS Periodic and processing tasks will be immediately scheduled, instead of waiting for App to go to background. Since doing on backgrounding will keep on changing earliest begin date. * Add printScheduledTasks to example app * Format example code * Option to set frequency for iOS periodic tasks in AppDelegate.swift * Add initialDelay support for Workmanager.registerProcessingTask * Remove unnecessary WorkmanagerPlugin.registerBGProcessingTask calls from AppDelegate.swift * Cleanup unused params from Workmanager.registerProcessingTask * Update readme and iOS setup as per new iOS developments * Create migration steps for iOS Workmanager.registerOneOffTask to Workmanager.registerProcessingTask * Update iOS docs * TODO for cleanups later --------- Co-authored-by: Lars Huth <[email protected]> Co-authored-by: xunreal75 <[email protected]> Co-authored-by: Ioseph Magno <[email protected]> Co-authored-by: delfme <[email protected]>
Can we release this in pub.dev already? |
Just so this isn't marked as stale, are there plans to release this version to pub.dev? |
This needs to be released to pub.dev |
Hello @ened ! Could you leave us a short comment here? Many people are waiting for at least some info here |
still waiting |
Keep waiting |
still fucking waiting |
waiting still fucking |
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: