Comments (8)
You may try to change the branch of the package in pubspec.yaml file:
workmanager:
git:
url: https://github.com/absar/flutter_workmanager.git
ref: ios-bg-tasks-enh-final
It may help you to solve your issue at this moment.
from flutter_workmanager.
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?
from flutter_workmanager.
I got the same error !!
from flutter_workmanager.
Don't you think that it's weird? The official git link is https://github.com/fluttercommunity/flutter_workmanager
but you are pulling code from https://github.com/absar/flutter_workmanager.git
who knows what he could code there.
from flutter_workmanager.
I could have elaborated a bit, those changes from https://github.com/absar/flutter_workmanager.git
are actually in main already and waiting to be released: b783000 👍
(or that is how I understood the situation)
from flutter_workmanager.
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 🥲
So for others that are struggling use the right version in your pubspec.yml
and read the Readme's from that commit b783000.
Pubspec
workmanager:
git:
url: https://github.com/fluttercommunity/flutter_workmanager.git
ref: b783000
from flutter_workmanager.
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:
- What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class androidx.work.OneTimeWorkRequestKt found in modules work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.0-runtime (androidx.work:work-runtime-ktx:2.7.0)
Duplicate class androidx.work.PeriodicWorkRequestKt found in modules work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.0-runtime (androidx.work:work-runtime-ktx:2.7.0)
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.
from flutter_workmanager.
Pubspec
workmanager: git: url: https://github.com/fluttercommunity/flutter_workmanager.git ref: b783000I 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:
- What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class androidx.work.OneTimeWorkRequestKt found in modules work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.0-runtime (androidx.work:work-runtime-ktx:2.7.0)
Duplicate class androidx.work.PeriodicWorkRequestKt found in modules work-runtime-2.8.1-runtime (androidx.work:work-runtime:2.8.1) and work-runtime-ktx-2.7.0-runtime (androidx.work:work-runtime-ktx:2.7.0)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:
implementation("androidx.work:work-runtime-ktx:2.8.1")
from flutter_workmanager.
Related Issues (20)
- Can I use it to implement the reload timeline for iOS widgets? HOT 1
- Support iOS BGHealthResearchTaskRequest (Feature request) HOT 1
- check if periodic task is scheduled
- Error while running app with workmanager package HOT 2
- Issue with WorkManager Periodic Task Scheduling HOT 1
- Periodic Task not working in killed state HOT 8
- How can I invoke work manager from native side? HOT 2
- Documentation - How to communicate between the background task (isolate) and other widgets
- Why need to check type of input data HOT 2
- "Failed to handle method" Exception When Setting "AllowBackup" option in androidManifest.xml HOT 2
- pub.dev 0.5.2 is not the latest version HOT 2
- There is a problem that the calendar schedule that I read with device_calendar is not displayed, so I'm asking for help.
- 🐞[Android production does not work on all phones]
- Methods not working in example app isScheduledByUniqueName
- 🐞 iOS Privacy Manifest is missing HOT 2
- In Android plugin works in killed state when `isInDebugMode: true` but when it's disabled it stops working. How to fix this?
- 🐞[Background Processing Task not working on iOS] HOT 3
- Whats the use of uniqueName and taskName
- How update UI in background using workmanager?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_workmanager.