Networking with URLSession · Conclusion | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/7476-networking-with-urlsession/lessons/24

Hello @bdmoakley! I have a question regarding how do you get around an issue like this:
[iOS 12 Beta 11] NSPOSIXErrorDomain Code=53: Software caused connection abort.

Is it possible to observe is URLSession has outstanding data tasks (I want invalidate background task as soon as it’s empty)? operationQueue.operationCount property is not reliable, as well as for delegate queue. Store all the data tasks for session and remove them seem to be a solution but I think not the perfect one.

@bdmoakley Can you please help with this when you get a chance? Thank you - much appreciated! :]