Swift 3 Compatible

I’ve been making a lot of improvements to the Clean Swift Xcode Templates, but it’s taking a lot longer than I anticipated. In the meantime, I’ve upgraded the templates to be compatible with the latest Xcode 8 and Swift 3. You can now get back to work with your latest toolchain, without having to manually fix the generated files. Enjoy!

You can download the updated templates using the same link in your previous email.

I’ll update the templates again when the new features are ready to ship. Stay tuned.

4 responses

  1. In the Swift 3 version of your templates, there’s some errors when you create unit tests. You forgot to change NSBundle to Bundle and NSRunLoop, RunLoop and NSDate to Date in the ViewControllerTests.

    need to be changed to:

      • Regarding your template update, when I test with Bundle.main, the test crash because of a cast error:

        Could not cast value of type ‘TestCleanSwift.ListOrdersViewController’ (0x107b4bf98) to ‘TestCleanSwiftTests.ListOrdersViewController’ (0x114cd25b8)

        It’s working fine with Bundle(for: type(of: self))

        • This is working for me:

          func setupListOrdersViewController() {
          let bundle = Bundle.main
          let storyboard = UIStoryboard(name: “Main”, bundle: bundle)
          sut = storyboard.instantiateViewController(withIdentifier: “ListOrdersViewController”) as! ListOrdersViewController
          }

          func loadView() {
          window.addSubview(sut.view)
          RunLoop.current.run(until: Date())
          }

Leave a Reply

Your email address will not be published. Required fields are marked *