New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Swift 4.2 #541
Update to Swift 4.2 #541
Conversation
e4cd0fc
to
02d160f
Compare
02d160f
to
51a06bf
Compare
@rhysforyou I would love to see this added! Thanks for doing this. |
@@ -25,18 +25,9 @@ import Foundation | |||
|
|||
#if os(iOS) || os(tvOS) | |||
import UIKit | |||
#if swift(>=4.2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused with why you removed this code? Wouldn't this break support for anything below Swift 4.2 ?
Looking into the |
Sorry, I'm confused. It looks like issue #543 wasn't resolved? In any case, I'm trying to use Swift 4.2 in my project, and as of now, adding SnapKit as a CocoaPods dependency causes my app to not compile. Using https://github.com/rhysforyou/SnapKit/tree/swift-4.2 as a remote dependency resolves it. |
@aapierce0 Sorry, I meant #516, and I meant the pod 'SnapKit', git: 'https://github.com/SnapKit/SnapKit', branch: 'develop' |
@freak4pc Aha, that seems to work. Thanks! |
Could we set the |
I don't see why you'd want to do that. It'd break backward compatibility for Swift 4 projects. |
I mean I'd wish the current podspec had I do understand there are problems with both approaches. Right now, I'd have to have post install script to set SnapKit's swift version to 4.0 |
Did you read the comments to this thread? More specifically the one directing to the develop branch ? |
I did, but I'd rather point to tags instead of branches |
You can run a post pod install hook adding it in your Podfile and in there force maybe even all your pod to go in Swift 4/4.1 mode... you can do more advanced processing but debugging these kind of changes is a bit of trial and error using the Xcodeproj gem Cocoapods relies on.
…Sent from my iPhone
On 17 Sep 2018, at 22:26, Kalvin Loc ***@***.***> wrote:
I did, but I'd rather point tags instead of branches
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
oh, |
Maybe for older Swift versions we can set up branch or tag and include |
@fassko I'm not sure what you mean exactly. I never saw a good reason to use |
@freak4pc I think you're right, makes total sense. Thanks! |
4.0.1 was released : https://github.com/SnapKit/SnapKit/releases/tag/4.0.1 |
There's still a warning that SnapKit 4.0.1 needs to be converted to Swift 4.2 in Xcode. |
Why was this closed? There's still a warning that SnapKit 4.0.1 needs to be converted to Swift 4.2. |
This change is wrong @likeSo - These two definitions aren't supported below Swift 4.2. |
Made a PR to fix the minor warning bothering y'all :) #547 |
This PR updates to SnapKit to build with Swift 4.2, which involves a few key changes:
LayoutAttribute
andLayoutRelation
attributes used for cross platform compatibility, as now all platforms useNSLayoutConstraint.Attribute
and `NSLayoutConstraint.RelationI have Travis running against my fork of the repo, you can see build results here: https://travis-ci.org/rhysforyou/SnapKit