Cartography icon indicating copy to clipboard operation
Cartography copied to clipboard

Issues building the latest version

Open SirWellington opened this issue 6 years ago • 3 comments

Trying to build this using Carthage on XCode 9.4.1.

Getting the following errors:

public typealias LayoutAttribute = NSLayoutConstraint.Attribute
                                   ~~~~~~~~~~~~~~~~~~ ^
/Users/wellington/Documents/Code/Censio/iOS/censio-ios-app/Code/Carthage/Checkouts/Cartography/Cartography/Context.swift:12:54: error: 'Relation' is not a member type of 'NSLayoutConstraint'
public typealias LayoutRelation = NSLayoutConstraint.Relation
                                  ~~~~~~~~~~~~~~~~~~ ^
/Users/wellington/Documents/Code/Censio/iOS/censio-ios-app/Code/Carthage/Checkouts/Cartography/Cartography/LayoutProxy.swift:18:64: error: 'Attribute' is not a member type of 'NSLayoutConstraint'
    internal func dimension(with attribute: NSLayoutConstraint.Attribute) -> Dimension {
                                            ~~~~~~~~~~~~~~~~~~ ^
/Users/wellington/Documents/Code/Censio/iOS/censio-ios-app/Code/Carthage/Checkouts/Cartography/Cartography/LayoutProxy.swift:22:59: error: 'Attribute' is not a member type of 'NSLayoutConstraint'
    internal func edge(with attribute: NSLayoutConstraint.Attribute) -> Edge {
                                       ~~~~~~~~~~~~~~~~~~ ^

Did you mean to use NSLayoutAttribute.

Help!

SirWellington avatar Oct 05 '18 00:10 SirWellington

I got this errors as well. It's ok in Xcode 10, appears in Xcode 10.1 beta2 anyone can help?

Monkey-D-Mark avatar Oct 11 '18 02:10 Monkey-D-Mark

Same issue,Help!

uhavemysword avatar Nov 30 '18 09:11 uhavemysword

For anyone still having trouble with this: NSLayoutAttribute was renamed to NSLayoutConstraint.Attribute in Swift 4.2.

I opened a PR to add swift_version = 4.2 to the podspec, which will remove the requirement that Cartography is integrated into a target that also uses 4.2 (for those using Cocoapods, at least).

timdonnelly avatar Dec 26 '18 23:12 timdonnelly