MengTo / Spring

A library to simplify iOS animations in Swift.
http://designcode.io
MIT License
14.08k stars 1.8k forks source link

Cant build for swift 4.2 #324

Open n4nachiket opened 5 years ago

n4nachiket commented 5 years ago

Hi, there are tons of errors for Swift 4.2. Seems like its not for 4.2. I installed using a pod. Do I need to add anything to podfile to make it work.

gbrigens commented 5 years ago

If you through the readme it has been specified on how to install in Xcode 10 with swift 4.2. If you run just add pod 'Spring' it will install v1.0.5. For it to run well you need v1.0.6,

  1. Remove the pod for spring file then clean your project.
  2. On the pod file add pod 'Spring', :git => 'https://github.com/MengTo/Spring.git'
  3. Install
  4. Clean your project

You should be good to go, though you will get some warning.

farzin680 commented 5 years ago

If you through the readme it has been specified on how to install in Xcode 10 with swift 4.2. If you run just add pod 'Spring' it will install v1.0.5. For it to run well you need v1.0.6,

  1. Remove the pod for spring file then clean your project.
  2. On the pod file add pod 'Spring', :git => 'https://github.com/MengTo/Spring.git'
  3. Install
  4. Clean your project

You should be good to go, though you will get some warning.

Absolutely Didn't Work !!!

farzin680 commented 5 years ago

If you through the readme it has been specified on how to install in Xcode 10 with swift 4.2. If you run just add pod 'Spring' it will install v1.0.5. For it to run well you need v1.0.6,

  1. Remove the pod for spring file then clean your project.
  2. On the pod file add pod 'Spring', :git => 'https://github.com/MengTo/Spring.git'
  3. Install
  4. Clean your project

You should be good to go, though you will get some warning.

Absolutely Didn't Work !!!

Well, Your Instructions is wrong. You Need To Remove ":git => 'https://github.com/MengTo/Spring.git'" from End Of "'Spring', :git => 'https://github.com/MengTo/Spring.git'" And Then Do "pod update" in Terminal and It'll Work Fine.

gyansantokhi commented 5 years ago

Curiously enough removing the ":git => 'https://github.com/MengTo/Spring.git'" part resulted in a downgrade from 1.0.6 to 1.0.5 here and this does work.

ArturGasparyan commented 5 years ago

Same here, please, kindly fix.

Robtles commented 5 years ago

I'm also using version 1.0.5 of Spring, but I have to force the Swift version to 4 instead of 4.2 in the Pod build settings in order to compile. Otherwise I'm getting a lot of errors too.

Also, I added these lines in my Podfile to automate the Swift version setting:

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if ['Spring'].include? target.name
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.0'
            end
        end
    end
end