Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes background session identifier publicly available #45

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ThunderRequest/RequestController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ open class RequestController {
/// Similar to a default session, except that a seperate process handles all data transfers. Background sessions have some additional limitations.
private var ephemeralSession: URLSession = URLSession(configuration: URLSessionConfiguration.ephemeral)

/// Returns the session identifier that was used to create the background session's `URLSessionConfiguration` object
/// this is useful for checking session identifiers when working with "Background Transfer Service"
public var backgroundSessionIdentifier: String? {
return backgroundSession.configuration.identifier
}

///MARK: - Initialization -

internal let dataStore: DataStore
Expand Down