Skip to content

Background task not cancelling when requested by system #54

@tcldr

Description

@tcldr

Describe the bug
As mentioned on our call, here's the warning that I'm regularly getting from the system.

[BackgroundTask] Background task still not ended after expiration handlers were called: <_UIBackgroundTaskInfo: 0x2835fdd40>: taskID = 4, taskName = Called by <AppName>, from $s7Segment0A11DestinationC14UploadTaskInfoV3url4taskAE10Foundation3URLV_So016NSURLSessionDataD0CtcfC, creationTime = 1095354 (elapsed = 27). This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this.

I assume this means the app will have to launch cold each time this occurs.

To Reproduce
It seems to happen intermittently.

I believe it usually occurs if I run a build on device, and that put aside the phone with the debugger still running. That message appeared almost 12 mins after the app was launched via a build and run in Xcode.

As mentioned, my current network is a little flakey so it could be related to a low/no network situation, too.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • Library Version in use: [e.g. 0.0.5]
  • Platform being tested: [e.g. iOS]
  • Integrations in use: [e.g. Firebase, Amplitude]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions