Skip to content
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

Does the example works? #4

Open
vicenterusso opened this issue Sep 26, 2020 · 1 comment
Open

Does the example works? #4

vicenterusso opened this issue Sep 26, 2020 · 1 comment

Comments

@vicenterusso
Copy link

I cloned the repo and started the example on ios simulator. Apparently nothing happened when I click the buttons, no error, no exceptions, no value being changed.

[✓] Flutter (Channel master, 1.22.0-10.0.pre.380, on Mac OS X 10.15.6 19G2021 x86_64, locale en-BR)
    • Flutter version 1.22.0-10.0.pre.380 at /Users/vicente/fvm/versions/master
    • Framework revision ec40df9576 (11 hours ago), 2020-09-25 21:27:22 -0700
    • Engine revision 3a73d073c8
    • Dart version 2.11.0 (build 2.11.0-161.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/vicente/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_SDK_ROOT = /Users/vicente/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.9.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.49.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.14.1


[✓] Connected device (1 available)
    • iPhone SE (2nd generation) (mobile) • 20FE9D1E-FFAB-4B29-807E-BDDB6794DE71 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)

• No issues found!
@2math
Copy link

2math commented May 27, 2021

I think the problem is from iOS, because the background process doesn't work the same way as android's WorkManager. The iOS still decides when to call your task :( and will not trigger immediately after all conditions are met as with the WorkManager.

There are example commands in the repo which you can use to force trigger the background event on iOS
https://github.com/xinthink/flt_worker/blob/master/example/lib/main.dart

Here is the documentation from apple : https://developer.apple.com/documentation/backgroundtasks/starting_and_terminating_tasks_during_development

I have tested it as registered an event , then kill the app and run it again from XCode with break point in the application class(after plugin registration). While the code is stopped on the break point, put in the console one of the commands from the main.dart and resume the app.
My callback writes many logs, basically after each row so I can see what has been done.

I think that this approach works on real devices only though.

However, another drawback is that you still have a limited time and if you are uploading 20 images may still not be enough to finish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants