GithubHelp home page GithubHelp logo

Update to Swift 2.0 about swiftr HOT 5 CLOSED

adamhartford avatar adamhartford commented on August 19, 2024
Update to Swift 2.0

from swiftr.

Comments (5)

adamhartford avatar adamhartford commented on August 19, 2024

The master branch should already be Swift 2. There is a swift12 branch for Swift 1.2. What error are you getting?

Edit: Oh, I realize I haven't released a Swift 2 to CocoaPods yet. I will do that now.

from swiftr.

PranKe01 avatar PranKe01 commented on August 19, 2024

I had to change the following lines:
let fileManager = NSFileManager.defaultManager()
try! fileManager.removeItemAtURL(jqueryTempURL)
try! fileManager.removeItemAtURL(signalRTempURL)
try! fileManager.removeItemAtURL(jsTempURL)
try! fileManager.copyItemAtURL(jqueryURL, toURL: jqueryTempURL)
try! fileManager.copyItemAtURL(signalRURL, toURL: signalRTempURL)
try! fileManager.copyItemAtURL(jsURL, toURL: jsTempURL)
To this:
let fileManager = NSFileManager.defaultManager()

            do {
                try fileManager.removeItemAtURL(jqueryTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

            do {
                try fileManager.removeItemAtURL(signalRTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

            do {
                try fileManager.removeItemAtURL(jsTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

            do {
                try fileManager.copyItemAtURL(jqueryURL, toURL: jqueryTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

            do {
                try fileManager.copyItemAtURL(signalRURL, toURL: signalRTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

            do {
                try fileManager.copyItemAtURL(jsURL, toURL: jsTempURL)
            } catch let error as NSError {
                print("Error: \(error)")
            }

from swiftr.

adamhartford avatar adamhartford commented on August 19, 2024

OK, thanks. You're right. Fixing now.

from swiftr.

adamhartford avatar adamhartford commented on August 19, 2024

The code has been updated and SwiftR v0.8.0 released (also published to CocoaPods). Let me know how it works out for you.

from swiftr.

adamhartford avatar adamhartford commented on August 19, 2024

Closing as everything looks good on iOS 9, OS X 10.11 with Swift 2.

from swiftr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.