Code Monkey home page Code Monkey logo

Comments (8)

Cmk427 avatar Cmk427 commented on June 11, 2024 1

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.

joonne avatar joonne commented on June 11, 2024

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.

nk4n01 avatar nk4n01 commented on June 11, 2024

I got the same error !!

from flutter_workmanager.

razumeiko avatar razumeiko commented on June 11, 2024

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.

joonne avatar joonne commented on June 11, 2024

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.

dario-digregorio avatar dario-digregorio commented on June 11, 2024

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.

Kurokirisu avatar Kurokirisu commented on June 11, 2024

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.

ghufrankhan avatar ghufrankhan commented on June 11, 2024

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.

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.