Skip to content

App may be killed in iOS if task is long #4

@aarani

Description

@aarani

MSDN describes how to use Background Tasks in here

The registration process pairs a task with a unique identifier, taskID, and then wraps it in matching BeginBackgroundTask and EndBackgroundTask calls. To generate the identifier, we make a call to the BeginBackgroundTask method on the UIApplication object, and then start the long-running task, usually on a new thread. When the task is complete, we call EndBackgroundTask and pass in the same identifier. This is important because iOS will terminate the application if a BeginBackgroundTask call does not have a matching EndBackgroundTask.

Steps To Reproduce:

  • Run a while (1) inside a background task or just a long Task.Delay or just any long task (more than 3 minutes?)

Potential bad results:

  • App gets terminated

Expected results:

  • Background task should get cancelled
  • App remain working untouched

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions