Networking with URLSession | raywenderlich.com

Learn how to use URLSession, Apple's networking API, including when and how to use data, download and upload tasks, with or without a custom session delegate, and how the system manages background sessions and WebSockets. Leverage the Combine API and SwiftUI to take your networking to the next level. Updated for iOS 13 and Swift 5.2.


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

Video for lesson 23 (“Connect to a WebSocket”) is missing. When I press on link instead of “Connect to a WebSocket”, “Conclusion” page is opened.

If you are still running into this issue, then send an email to support@razeware.com. Thanks!

@ava_ios_team I have checked the video on the website, and Lesson 23 is indeed playing correctly. I apologize for any issues you were facing earlier.

Hello! is there a Networking with URlSession course that is not focused on SwiftUI and Combine?
I was very excited to see this course pop up but I am now noticing that it is focused on Networking with SwiftUI and Combine in mind.

Thanks!

Hey there! There is an older version of this course that is all UIKit based. It’s not up to date with the latest version of Xcode but it should work fine.

https://www.raywenderlich.com/7476-networking-with-urlsession/lessons/1

Hi Brian,

Thank you for the speedy response – I appreciate it. For some reason when I searched for “URLSession” or “Networking” I only see the new SwiftUI Video course and the Half-Tune app article on Networking. *This is exactly what I was hoping to find, thanks for sharing the link.

Cheers!

1 Like

Hi @bdmoakley Thank you for the tutorial :blush: I have a question regarding NSURLSession with a background configuration. I my case I have a simple REST API to fetch a simple json response (around 15kb). This is done with a NSURLSession with a default configuration and a corresponding NSURLSessionDataTask at various times when the app is in the foreground. Now I need to do the same call upon receiving a silent push notification. As the app my be in the background, how would I need to configure the session? I mean it is not a lot of data that is being fetched, but the app may be in the background. Would I need to do this with an NSURLSession with a background configuration and a download task (as dataTasks are not supported with a background configuration) or default configuration? Thanks in Advance :slight_smile:

@reni99 Do you still have issues with this?