Rightpoint / Anchorage

A collection of operators and utilities that simplify iOS layout code.
MIT License
627 stars 46 forks source link

Fix up Swift versions #68

Closed armcknight closed 5 years ago

armcknight commented 5 years ago

Hey, back again but couldn't reopen https://github.com/Raizlabs/Anchorage/pull/67.

After more reading I learned that .swift-version is used for linting, so I left it in here and updated it to 4.2.

Adding the swift_version declaration in the podspec ensures that the SWIFT_VERSION target build setting is set in Xcode for consumers of your pod. I had a bit of trouble sorting this out, hence the confusion on my last PR. Hopefully this clears things up for everyone!

armcknight commented 5 years ago

How can we get this merged? With Swift 5 out, I'm seeing this error on pod install for a target that defines SWIFT_VERSION = 5 in an xcconfig:

- `Anchorage` does not specify a Swift version and none of the targets (`mytarget`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.

when i pod install against my branch, this error is not present.

ZevEisenberg commented 5 years ago

We should totally merge it. My only hesitation is that we might want to support the new swift_versions flag, or whatever it is, in latest CocoaPods, but Xcode 10.2 will build this in 4.x mode and other code in 5 mode in the same project, right?

We should also get this repo building on Xcode 10.1 and 10.2 on CircleCI, but it shouldn't gate this merge and point release.

armcknight commented 5 years ago

I think we should wait on the new swift_versions API as it seems to be breaking backward compatibility: https://github.com/CocoaPods/CocoaPods/issues/8635