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

Conversation

simonmitchell
Copy link
Contributor

Description

Adds a property for reading the RequestController's background session configuration identifier

Motivation and Context

It was discovered that when using Apple's "Background Transfer Service" sometimes the original request controller which made the request was kept in memory and still available when the delegate method: application:handleEventsForBackgroundURLSession:completionHandler is called. In this case if you setup a BackgroundRequestController with the same identifier as the original RequestController you break the nsurlsessiond. This new property can be used to check if you already have an existing URLSession which will continue to receive delegate messages which can be used in place of a new BackgroundRequestController!

How Has This Been Tested?

Doesn't really need testing, it's just making a property available!

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@simonmitchell simonmitchell merged commit 8f128aa into develop Apr 8, 2020
@simonmitchell simonmitchell deleted the feature/background_session_identifier branch April 8, 2020 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants