Video Tutorial: Introducing Concurrency - Compressor Source in Swift 3

Hello,

I am Martin and fairly new to swift. Started to work with the Video Tutorial: Introducing Concurrency - Running Xcode 8 I thought converting the source to swift 3 might work. It didn’t work out of the box, for me at least.

Is it just better to stick with swift 2.3, wich works, concerning this Tutorial or isn’t it that difficult to convert it manually?

Update1
It runs now. Converted the Source by hand without the build in converter, using all fix-it suggestions made by Xcode.

Two lines needed some manual work.

Changes NSData+Compression.swift:
64: self.init(data: uncompressedData as Data)
137: stream.src_ptr = bytes.assumingMemoryBound(to:UInt8.self)

I don’t actually know exactly what these changes impact, so use it at your own risk.

Now I can start to work on the challenge. : )

@pappmaschee Thanks very much for your question, and my apologies for the delay in responding. I’m glad you were able to figure out a solution to your issue, but I would state that in general, you SHOULD use Swift 3 over all previous versions, UNLESS the tutorial you are working on is meant for a previous version (in which case, you should hopefully be using a newer version of the tutorial).

I hope this helps!

All the best!