measurement-kit/ios-example

Add hint about background task

Opened this issue · 0 comments

In the new OONI app @lorenzoPrimi is coding it like this:

    self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
        [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
        self.backgroundTask = UIBackgroundTaskInvalid;
    }];

Since one is supposed to fork the app and do further work, it's probably nice to include already the support for a background task, even though it's not strictly necessary.

There is probably more to do. Let's ask @lorenzoPrimi when it's time to add this feature!