Group Group Group Group Group Group Group Group Group

Networking with URLSession · Session Tasks | raywenderlich.com

#1

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

Hi! Why do you use NSString(data…) as String instead of just using String(bytes: encoding:) to make string from data?

Thanx

#3

Good point - thanks for the heads up.

#4

On: configuration.waitsForConnectivity = “true”
I get this error: Expressions are not allowed at the top level

I have Swiftt & Xcode 10.2.1

#5

That’s hard to diagnose what’s occurring here. Would you please provide more code?

#6

Ah Sorry. I see you were using playground just for basic demo of components. It was just that playgrounds was acting funny as usual so I tried to go to project with your playground code

#7

Put in playground and works. (now)

1 Like
#8

@ingo69 Glad you sorted it out! Cheers! :]