[Coming soon] Configure background tasks
цю сторінку треба видалити?
We utilize background tasks to send you a usage report when a user doesn't use your application at the moment. This allows us to ensure that usage tracking is delivered to our servers.
To send network requests with usage reports in the background, you must select the Background fetch
checkbox in the Background modes
capability group.
- Go to the Signing & Capabilities tab.
- Add
Background modes
capability. - Select
Background fetch
mode. - Select
Background processing
mode.
Add the following code to your UIApplicationDelegate
class:
func application(
_ application: UIApplication,
handleEventsForBackgroundURLSession identifier: String,
completionHandler: @escaping () -> Void
)
{
if SetappManager.isSetappBackgroundSessionIdentifier(identifier) {
SetappManager.shared.backgroundSessionCompletionHandler = completionHandler
}
}
Permitted background task identifiers
For iOS 13 and later, we also utilize background tasks. That means that you must allow Setapp to run background tasks with specific identifiers. To do that:
- Open your
Info.plist
file. - Add the
Permitted background task scheduler identifiers
(BGTaskSchedulerPermittedIdentifiers
) key to the dictionary. - Append
com.setapp.usageReport
to the key values array.
Updated 3 months ago