Skip to content

Conversation

@aanorbel
Copy link
Member

@aanorbel aanorbel commented Nov 11, 2024

Closes #250 , ooni/probe#2361 , ooni/probe#2175

Proposed Changes

  • Implemented a new IosBackgroundRunner class to handle running tasks in the background on iOS devices. The IosBackgroundRunner class sets up a background task and an audio player to keep the app running in the background, even when the app is not in the foreground.
  • Delete RunOperation

https://hayageek.com/ios-long-running-background-task/

@aanorbel aanorbel requested a review from sdsantos November 11, 2024 21:42

/// Invoke the given task in the background.
func invoke(background: @escaping () -> Void) {
let serialQueue = DispatchQueue(label: "org.openobservatory.queue", qos: .userInitiated, attributes: [.concurrent])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the label differ from depending on the applicationID or package? Or there's no possibility of conflict between apps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah. good point. Will correct this.

@aanorbel aanorbel merged commit 49084f2 into main Nov 13, 2024
7 checks passed
@aanorbel aanorbel deleted the issues/250 branch November 13, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NMS iOS: Unsure if app continues to run tests in background

4 participants