# Networking with URLSession - Part 1: Introduction | Ray Wenderlich

**URL:** <https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 21, 2017, 1:15pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375 "2017-03-21T13:15:20Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![mmehr2](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@mmehr2](https://forums.kodeco.com/u/mmehr2)\
**Post date:** [July 29, 2017, 3:24pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/21 "2017-07-29T15:24:36Z")

</div>

Hi Audrey,

I really appreciate finding your tutorials here. They have been very helpful.

I wonder if you could advise me on my app. I have used hidden WKWebView objects to start URL downloads (via load()), which run on the main thread. Then I would inject a Javascript script to scan the DOM I get and send messages to a delegate object of my own design to capture the data of interest to me. This has worked fine for me, but as I now need to download many pages at a time for category parsing, I’ve noticed how the UI will block (thanks to your Concurrency Tutorial for insights on this!).

My question is whether I can use my existing architecture with URLSession, or whether I need to scrap the Javascript parsing and get some kind of HTML Parser library for Swift instead. I suspect that the URLSession design really isn’t setup to manage script injection. Am I right?

Thanks for any insights you can provide.  
Best regards,

Mike Mehr

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [July 30, 2017, 11:29am UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/22 "2017-07-30T11:29:37Z")

</div>

hi Mike: sorry, I’ve never done anything so exotic 😁

I wrote a tutorial on CloudKit JS, but that’s Apple providing JS to access the CloudKit API.

I’m sure there are good HTML parsers in Swift, somewhere on GitHub or similar.

---

<div class="post-metadata">

**Author:** ![mmehr2](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@mmehr2](https://forums.kodeco.com/u/mmehr2)\
**Post date:** [August 1, 2017, 1:52am UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/23 "2017-08-01T01:52:34Z")

</div>

Thanks, Audrey. I’ll go look for a few of those libraries then instead and rewrite my exotic app using something a bit more standard so I can capitalize on the background behavior. Being a lone programmer, I sometimes forget that solutions that I devise from reading the Apple docs really aren’t the accepted way of doing things. It just seemed to be the way to make things work at the time I was looking into this (late 2014 thru 2015).  
Regards,  
Mike

---

<div class="post-metadata">

**Author:** ![mawaliya](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mawaliya/32/81494_2.png) [@mawaliya](https://forums.kodeco.com/u/mawaliya)\
**Post date:** [August 23, 2017, 11:03pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/24 "2017-08-23T23:03:53Z")

</div>

Hi @audrey,

I really love your courses. Your explanation is always great making complicated matters so simple. Keep up the good work!

Cheers!

---

<div class="post-metadata">

**Author:** ![agung](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/agung/32/102075_2.png) [@agung](https://forums.kodeco.com/u/agung)\
**Post date:** [November 4, 2017, 10:18am UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/25 "2017-11-04T10:18:03Z")

</div>

hi @audrey , Thanks for your great video tutorial. I really want to understand about networking. is there any prerequisite course that I should watch before I watch this course about Networking with URL Session? this is the first section that i watch in RayWenderlich.

my education background is actually chemical engineering, so…I don’t know, I am not really comfortable to study about this topic. maybe you could give me suggestion what topic that I study first ? I am a beginner in iOS development, i understand about basic and intermediate swift. but when I follow other tutorials that needs networking and concurrency, i feel bad,  
because i just copy the code, I don’t really grasp about it, I want to understand. Thanks Audrey, I hope you understand my confusion 🙈 😁

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [November 4, 2017, 9:51pm UTC](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375/26 "2017-11-04T21:51:19Z")

</div>

hi! if you’re familiar with Swift, and comfortable with writing completion handlers, you should be fine with this course. I was the same, before taking on this video course — I only knew how to copy-paste-edit the simplest URLSession task. When I started updating the original course, I was amazed how much more there was to networking!

If you want a quick look, you could work through this tutorial first:

[https://www.raywenderlich.com/158106/urlsession-tutorial-getting-started](https://www.raywenderlich.com/158106/urlsession-tutorial-getting-started)

It builds a version of the same HalfTunes app that this course uses.

There’s an updated version (Xcode 9, iOS 11, Swift 4) of this course that should be appearing soon — mainly JSON parsing and some new background/continuity features.

[Previous page](https://forums.kodeco.com/t/networking-with-urlsession-part-1-introduction-ray-wenderlich/27375.md?page=1)
