Needs Grand Renaming rules applied to work with Xcode 8 & Swift 3
BarkCarver opened this issue · 2 comments
Now that Xcode 8 & Swift 3 have been released, I want to download all the WWDC 2016 Content but the wwdc2016.swift script doesn't work with Swift 3 and the Grand Renaming. I know all the serious developers downloaded this content a long time ago but I'm a NOOB with Swift so it would really help to have access to all the WWDC 2016 content. Thanks - Russell
Examples of errors output when I run the script:
./wwdc2016.swift:53:42: error: 'NSURLSessionDownloadDelegate' has been renamed to 'URLSessionDownloadDelegate'
class DownloadSessionManager : NSObject, NSURLSessionDownloadDelegate {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
URLSessionDownloadDelegate
./wwdc2016.swift:60:21: error: 'dispatch_semaphore_create' has been replaced by 'DispatchSemaphore.init(value:)'
let semaphore = dispatch_semaphore_create(0)
^~~~~~~~~~~~~~~~~~~~~~~~~
It's easiest to go here and install the 2.2 package.
https://swift.org/download/#older_release_branches
Edit: This doesn't work with Xcode 8, the version number is wrong
Easy solution is to change the toolchain with xcrun. Modify the first line of the script...
e.g.
#!/usr/bin/env xcrun --toolchain "com.apple.dt.toolchain.Swift_2_3" swift