Skip to content

🐞[Background Processing Task not working on iOS] #557

@sinhpn92

Description

@sinhpn92

Hello,

I have integrated according to the instructions for iOS. I have also tried with the example project, but it doesn't work with registerProcessingTask. When I tried with registerOneOffTask, it worked, but registerProcessingTask did not. Has anyone encountered this issue on iOS?

I check the console log of device and receive the cancellation log:

15:09:38.380551+0700	Runner	submitTaskRequest: <BGProcessingTaskRequest: be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask, earliestBeginDate: 2024-05-20 08:09:41 +0000, requiresExternalPower=0, requiresNetworkConnectivity=0>
15:09:38.380904+0700	Runner	Submitting task request activity: bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:200A93
15:09:38.388829+0700	dasd	Daemon Canceling Activities: {(
    bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:751E8D
)}
15:09:38.389446+0700	dasd	CANCELED: bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:751E8D at priority 10 <private>!
15:09:38.393362+0700	dasd	Submitted Activity: bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:200A93 at priority 10 (Mon May 20 15:17:08 2024 - Mon May 27 15:17:08 2024)
15:17:08.728142+0700	dasd	bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:200A93:[
	{name: DeviceActivityPolicy, policyWeight: 5.000, response: {Decision: Can Proceed, Score: 0.05}}
 ] sumScores:25.880000, denominator:30.630000, FinalDecision: Can Proceed FinalScore: 0.844923}
15:17:08.728425+0700	dasd	'bgProcessing-be.tramckrijte.workmanagerExample.iOSBackgroundProcessingTask:200A93' CurrentScore: 0.844923, ThresholdScore: 0.851473 DecisionToRun:0

My versions:

  workmanager:
    git:
      url: https://github.com/fluttercommunity/flutter_workmanager.git
      ref: b783000

Doctor:

[✓] Flutter (Channel stable, 3.19.5, on macOS 14.3.1 23D60 darwin-arm64, locale en-US)
    • Flutter version 3.19.5 on channel stable at /Data/flutter_sdk
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (8 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1
    
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions