Pārlūkot izejas kodu

Re-organized Project

Robert Payne 10 gadi atpakaļ
vecāks
revīzija
c5bab635ec

+ 9 - 13
README.md

@@ -6,26 +6,22 @@ Snap is a light-weight layout framework which wraps AutoLayout with a nicer synt
 
 ## Requirements
 
-* iOS 7.0+ / Mac OS X 10.9+ (Using Cocoapods 0.36.0.beta.1 or later – iOS 8.0+ / Mac OS X 10.9+)
+* iOS 7.0+ / Mac OS X 10.9+
 * Xcode 6.1
 
-## Installation
+## Installation Cocoapods
 
-_Due to the current lack of [proper infrastructure](http://cocoapods.org) for Swift dependency management, using Snap in your project requires the following steps:_
+1. Add Snap as a line in your Podfile `pod 'Snap'`
+2. Run `pod install`
+3. Add `import Snap` to your `AppDelegate.swift`
 
-1. Add Snap as a [submodule](http://git-scm.com/docs/git-submodule) by opening the Terminal, `cd`-ing into your top-level project directory, and entering the command `git submodule add https://github.com/Masonry/Snap.git`
-2. Open the `Snap` folder, and drag `Snap.xcodeproj` into the file navigator of your Xcode project<sup>1</sup>.
-3. In Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.
-4. In the tab bar at the top of that window, open the "General" panel.
-5. Click on the `+` button in the "Embedded Binaries" group of the panel and select and add `Snap.framework`.
+<small>Cocoapods installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets.</small>
 
-<sup>1</sup><small>It's important you add Snap as a subproject of your Xcode Project and not of a potential Xcode Workspace containing your project</small>
+## Installation Carthage
 
-## Installation (Cocoapods pre-release)
+Carthage is supported by adding `github 'Masonry/Snap'` to your Cartfile.
 
-1. Add Snap as a line in your Podfile `pod 'Snap'`
-2. Run `pod install`
-3. Add `import Snap` to your `AppDelegate.swift`
+<small>Carthage installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets.</small>
 
 ## What's wrong with NSLayoutConstraints?
 

+ 28 - 0
Snap OSX/Info.plist

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.masonry.$(PRODUCT_NAME:rfc1034identifier)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>FMWK</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(CURRENT_PROJECT_VERSION)</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright © 2015 Jonas Budelmann. All rights reserved.</string>
+	<key>NSPrincipalClass</key>
+	<string></string>
+</dict>
+</plist>

+ 19 - 0
Snap OSX/Snap OSX.h

@@ -0,0 +1,19 @@
+//
+//  Snap OSX.h
+//  Snap OSX
+//
+//  Created by Robert Payne on 24/03/15.
+//  Copyright (c) 2015 Jonas Budelmann. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+//! Project version number for Snap OSX.
+FOUNDATION_EXPORT double Snap_OSXVersionNumber;
+
+//! Project version string for Snap OSX.
+FOUNDATION_EXPORT const unsigned char Snap_OSXVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <Snap_OSX/PublicHeader.h>
+
+

+ 0 - 0
SnapTests/Info.plist → Snap OSXTests/Info.plist


+ 36 - 0
Snap OSXTests/Snap_OSXTests.swift

@@ -0,0 +1,36 @@
+//
+//  Snap_OSXTests.swift
+//  Snap OSXTests
+//
+//  Created by Robert Payne on 24/03/15.
+//  Copyright (c) 2015 Jonas Budelmann. All rights reserved.
+//
+
+import Cocoa
+import XCTest
+
+class Snap_OSXTests: XCTestCase {
+    
+    override func setUp() {
+        super.setUp()
+        // Put setup code here. This method is called before the invocation of each test method in the class.
+    }
+    
+    override func tearDown() {
+        // Put teardown code here. This method is called after the invocation of each test method in the class.
+        super.tearDown()
+    }
+    
+    func testExample() {
+        // This is an example of a functional test case.
+        XCTAssert(true, "Pass")
+    }
+    
+    func testPerformanceExample() {
+        // This is an example of a performance test case.
+        self.measureBlock() {
+            // Put the code you want to measure the time of here.
+        }
+    }
+    
+}

+ 308 - 90
Snap.xcodeproj/project.pbxproj

@@ -8,32 +8,56 @@
 
 /* Begin PBXBuildFile section */
 		EEAED5481A8F56A500777EF9 /* Snap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEBCC9D819CC627D0083B827 /* Snap.framework */; };
-		EEAED5491A8F56BF00777EF9 /* SnapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE91728C19CB304E007888CF /* SnapTests.swift */; };
-		EEBCC9F019CC64F80083B827 /* EdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9EF19CC64F70083B827 /* EdgeInsets.swift */; };
-		EEBCC9F219CC65050083B827 /* View+Snap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9F119CC65040083B827 /* View+Snap.swift */; };
-		EEBCC9F419CC65110083B827 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9F319CC65110083B827 /* ConstraintAttributes.swift */; };
-		EEBCC9F619CC65200083B827 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9F519CC65200083B827 /* ConstraintRelation.swift */; };
-		EEBCC9F819CC65260083B827 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9F719CC65260083B827 /* ConstraintItem.swift */; };
-		EEBCC9FC19CC65430083B827 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9FB19CC65430083B827 /* ConstraintMaker.swift */; };
-		EEBCC9FE19CC65510083B827 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9FD19CC65510083B827 /* LayoutConstraint.swift */; };
-		EEBCCA0019CC66020083B827 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEBCC9FF19CC66020083B827 /* Constraint.swift */; };
+		EECDB36C1AC0C9A6006BBC11 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35E1AC0C95C006BBC11 /* Constraint.swift */; };
+		EECDB36D1AC0C9A6006BBC11 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */; };
+		EECDB36E1AC0C9A6006BBC11 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */; };
+		EECDB36F1AC0C9A6006BBC11 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */; };
+		EECDB3701AC0C9A6006BBC11 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */; };
+		EECDB3711AC0C9A6006BBC11 /* EdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */; };
+		EECDB3721AC0C9A6006BBC11 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */; };
+		EECDB3731AC0C9A6006BBC11 /* View+Snap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3671AC0C95C006BBC11 /* View+Snap.swift */; };
+		EECDB3741AC0C9B6006BBC11 /* Snap.h in Headers */ = {isa = PBXBuildFile; fileRef = EECDB3661AC0C95C006BBC11 /* Snap.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		EECDB3851AC0C9D4006BBC11 /* Snap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EECDB37A1AC0C9D4006BBC11 /* Snap.framework */; };
+		EECDB3931AC0CB52006BBC11 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB36A1AC0C95C006BBC11 /* Tests.swift */; };
+		EECDB3941AC0CB52006BBC11 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB36A1AC0C95C006BBC11 /* Tests.swift */; };
+		EECDB3951AC0CBFF006BBC11 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35E1AC0C95C006BBC11 /* Constraint.swift */; };
+		EECDB3961AC0CBFF006BBC11 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */; };
+		EECDB3971AC0CBFF006BBC11 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */; };
+		EECDB3981AC0CBFF006BBC11 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */; };
+		EECDB3991AC0CBFF006BBC11 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */; };
+		EECDB39A1AC0CBFF006BBC11 /* EdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */; };
+		EECDB39B1AC0CBFF006BBC11 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */; };
+		EECDB39C1AC0CBFF006BBC11 /* View+Snap.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3671AC0C95C006BBC11 /* View+Snap.swift */; };
+		EECDB39D1AC0CC03006BBC11 /* Snap.h in Headers */ = {isa = PBXBuildFile; fileRef = EECDB3661AC0C95C006BBC11 /* Snap.h */; settings = {ATTRIBUTES = (Public, ); }; };
 /* End PBXBuildFile section */
 
+/* Begin PBXContainerItemProxy section */
+		EECDB3861AC0C9D4006BBC11 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = DDC9FD8D1981B4DD009612C7 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = EECDB3791AC0C9D4006BBC11;
+			remoteInfo = "Snap OSX";
+		};
+/* End PBXContainerItemProxy section */
+
 /* Begin PBXFileReference section */
-		EE91728119CB304E007888CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		EE91728219CB304E007888CF /* Snap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Snap.h; sourceTree = "<group>"; };
-		EE91728B19CB304E007888CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		EE91728C19CB304E007888CF /* SnapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapTests.swift; sourceTree = "<group>"; };
 		EEBCC9D819CC627D0083B827 /* Snap.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Snap.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		EEBCC9E219CC627E0083B827 /* SnapTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SnapTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
-		EEBCC9EF19CC64F70083B827 /* EdgeInsets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EdgeInsets.swift; sourceTree = "<group>"; };
-		EEBCC9F119CC65040083B827 /* View+Snap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+Snap.swift"; sourceTree = "<group>"; };
-		EEBCC9F319CC65110083B827 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintAttributes.swift; sourceTree = "<group>"; };
-		EEBCC9F519CC65200083B827 /* ConstraintRelation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintRelation.swift; sourceTree = "<group>"; };
-		EEBCC9F719CC65260083B827 /* ConstraintItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintItem.swift; sourceTree = "<group>"; };
-		EEBCC9FB19CC65430083B827 /* ConstraintMaker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintMaker.swift; sourceTree = "<group>"; };
-		EEBCC9FD19CC65510083B827 /* LayoutConstraint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutConstraint.swift; sourceTree = "<group>"; };
-		EEBCC9FF19CC66020083B827 /* Constraint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constraint.swift; sourceTree = "<group>"; };
+		EEBCC9E219CC627E0083B827 /* Snap iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Snap iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		EECDB35E1AC0C95C006BBC11 /* Constraint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constraint.swift; sourceTree = "<group>"; };
+		EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintAttributes.swift; sourceTree = "<group>"; };
+		EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintItem.swift; sourceTree = "<group>"; };
+		EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintMaker.swift; sourceTree = "<group>"; };
+		EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintRelation.swift; sourceTree = "<group>"; };
+		EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EdgeInsets.swift; sourceTree = "<group>"; };
+		EECDB3641AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutConstraint.swift; sourceTree = "<group>"; };
+		EECDB3661AC0C95C006BBC11 /* Snap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Snap.h; sourceTree = "<group>"; };
+		EECDB3671AC0C95C006BBC11 /* View+Snap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Snap.swift"; sourceTree = "<group>"; };
+		EECDB3691AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		EECDB36A1AC0C95C006BBC11 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = "<group>"; };
+		EECDB37A1AC0C9D4006BBC11 /* Snap.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Snap.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		EECDB3841AC0C9D4006BBC11 /* Snap OSX Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Snap OSX Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -52,14 +76,29 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		EECDB3761AC0C9D4006BBC11 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		EECDB3811AC0C9D4006BBC11 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EECDB3851AC0C9D4006BBC11 /* Snap.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXFrameworksBuildPhase section */
 
 /* Begin PBXGroup section */
 		DDC9FD8C1981B4DD009612C7 = {
 			isa = PBXGroup;
 			children = (
-				EE91727F19CB304E007888CF /* Snap */,
-				EE91728919CB304E007888CF /* SnapTests */,
+				EECDB35D1AC0C95C006BBC11 /* Source */,
+				EECDB3681AC0C95C006BBC11 /* Tests */,
 				DDC9FD961981B4DD009612C7 /* Products */,
 			);
 			sourceTree = "<group>";
@@ -68,49 +107,43 @@
 			isa = PBXGroup;
 			children = (
 				EEBCC9D819CC627D0083B827 /* Snap.framework */,
-				EEBCC9E219CC627E0083B827 /* SnapTests.xctest */,
+				EEBCC9E219CC627E0083B827 /* Snap iOS Tests.xctest */,
+				EECDB37A1AC0C9D4006BBC11 /* Snap.framework */,
+				EECDB3841AC0C9D4006BBC11 /* Snap OSX Tests.xctest */,
 			);
 			name = Products;
 			sourceTree = "<group>";
 		};
-		EE91727F19CB304E007888CF /* Snap */ = {
-			isa = PBXGroup;
-			children = (
-				EE91728219CB304E007888CF /* Snap.h */,
-				EEBCC9F119CC65040083B827 /* View+Snap.swift */,
-				EEBCC9FB19CC65430083B827 /* ConstraintMaker.swift */,
-				EEBCC9FF19CC66020083B827 /* Constraint.swift */,
-				EEBCC9F719CC65260083B827 /* ConstraintItem.swift */,
-				EEBCC9F319CC65110083B827 /* ConstraintAttributes.swift */,
-				EEBCC9F519CC65200083B827 /* ConstraintRelation.swift */,
-				EEBCC9FD19CC65510083B827 /* LayoutConstraint.swift */,
-				EEBCC9EF19CC64F70083B827 /* EdgeInsets.swift */,
-				EE91728019CB304E007888CF /* Supporting Files */,
-			);
-			path = Snap;
-			sourceTree = "<group>";
-		};
-		EE91728019CB304E007888CF /* Supporting Files */ = {
+		EECDB35D1AC0C95C006BBC11 /* Source */ = {
 			isa = PBXGroup;
 			children = (
-				EE91728119CB304E007888CF /* Info.plist */,
+				EECDB3661AC0C95C006BBC11 /* Snap.h */,
+				EECDB35E1AC0C95C006BBC11 /* Constraint.swift */,
+				EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */,
+				EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */,
+				EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */,
+				EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */,
+				EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */,
+				EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */,
+				EECDB3671AC0C95C006BBC11 /* View+Snap.swift */,
+				EECDB36B1AC0C967006BBC11 /* Supporting Files */,
 			);
-			name = "Supporting Files";
+			path = Source;
 			sourceTree = "<group>";
 		};
-		EE91728919CB304E007888CF /* SnapTests */ = {
+		EECDB3681AC0C95C006BBC11 /* Tests */ = {
 			isa = PBXGroup;
 			children = (
-				EE91728C19CB304E007888CF /* SnapTests.swift */,
-				EE91728A19CB304E007888CF /* Supporting Files */,
+				EECDB3691AC0C95C006BBC11 /* Info.plist */,
+				EECDB36A1AC0C95C006BBC11 /* Tests.swift */,
 			);
-			path = SnapTests;
+			path = Tests;
 			sourceTree = "<group>";
 		};
-		EE91728A19CB304E007888CF /* Supporting Files */ = {
+		EECDB36B1AC0C967006BBC11 /* Supporting Files */ = {
 			isa = PBXGroup;
 			children = (
-				EE91728B19CB304E007888CF /* Info.plist */,
+				EECDB3641AC0C95C006BBC11 /* Info.plist */,
 			);
 			name = "Supporting Files";
 			sourceTree = "<group>";
@@ -122,15 +155,24 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				EECDB3741AC0C9B6006BBC11 /* Snap.h in Headers */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		EECDB3771AC0C9D4006BBC11 /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EECDB39D1AC0CC03006BBC11 /* Snap.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
-		EEBCC9D719CC627D0083B827 /* Snap */ = {
+		EEBCC9D719CC627D0083B827 /* Snap iOS */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = EEBCC9E819CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap" */;
+			buildConfigurationList = EEBCC9E819CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap iOS" */;
 			buildPhases = (
 				EEBCC9D319CC627D0083B827 /* Sources */,
 				EEBCC9D419CC627D0083B827 /* Frameworks */,
@@ -141,14 +183,14 @@
 			);
 			dependencies = (
 			);
-			name = Snap;
+			name = "Snap iOS";
 			productName = Snap;
 			productReference = EEBCC9D819CC627D0083B827 /* Snap.framework */;
 			productType = "com.apple.product-type.framework";
 		};
-		EEBCC9E119CC627D0083B827 /* SnapTests */ = {
+		EEBCC9E119CC627D0083B827 /* Snap iOS Tests */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = EEBCC9EB19CC627E0083B827 /* Build configuration list for PBXNativeTarget "SnapTests" */;
+			buildConfigurationList = EEBCC9EB19CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap iOS Tests" */;
 			buildPhases = (
 				EEBCC9DE19CC627D0083B827 /* Sources */,
 				EEBCC9DF19CC627D0083B827 /* Frameworks */,
@@ -158,9 +200,45 @@
 			);
 			dependencies = (
 			);
-			name = SnapTests;
+			name = "Snap iOS Tests";
 			productName = SnapTests;
-			productReference = EEBCC9E219CC627E0083B827 /* SnapTests.xctest */;
+			productReference = EEBCC9E219CC627E0083B827 /* Snap iOS Tests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+		EECDB3791AC0C9D4006BBC11 /* Snap OSX */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = EECDB38D1AC0C9D4006BBC11 /* Build configuration list for PBXNativeTarget "Snap OSX" */;
+			buildPhases = (
+				EECDB3751AC0C9D4006BBC11 /* Sources */,
+				EECDB3761AC0C9D4006BBC11 /* Frameworks */,
+				EECDB3771AC0C9D4006BBC11 /* Headers */,
+				EECDB3781AC0C9D4006BBC11 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "Snap OSX";
+			productName = "Snap OSX";
+			productReference = EECDB37A1AC0C9D4006BBC11 /* Snap.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+		EECDB3831AC0C9D4006BBC11 /* Snap OSX Tests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = EECDB3901AC0C9D4006BBC11 /* Build configuration list for PBXNativeTarget "Snap OSX Tests" */;
+			buildPhases = (
+				EECDB3801AC0C9D4006BBC11 /* Sources */,
+				EECDB3811AC0C9D4006BBC11 /* Frameworks */,
+				EECDB3821AC0C9D4006BBC11 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				EECDB3871AC0C9D4006BBC11 /* PBXTargetDependency */,
+			);
+			name = "Snap OSX Tests";
+			productName = "Snap OSXTests";
+			productReference = EECDB3841AC0C9D4006BBC11 /* Snap OSX Tests.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
 /* End PBXNativeTarget section */
@@ -170,7 +248,7 @@
 			isa = PBXProject;
 			attributes = {
 				LastUpgradeCheck = 0600;
-				ORGANIZATIONNAME = "Jonas Budelmann";
+				ORGANIZATIONNAME = "Masonry Team";
 				TargetAttributes = {
 					EEBCC9D719CC627D0083B827 = {
 						CreatedOnToolsVersion = 6.0;
@@ -178,6 +256,12 @@
 					EEBCC9E119CC627D0083B827 = {
 						CreatedOnToolsVersion = 6.0;
 					};
+					EECDB3791AC0C9D4006BBC11 = {
+						CreatedOnToolsVersion = 6.2;
+					};
+					EECDB3831AC0C9D4006BBC11 = {
+						CreatedOnToolsVersion = 6.2;
+					};
 				};
 			};
 			buildConfigurationList = DDC9FD901981B4DD009612C7 /* Build configuration list for PBXProject "Snap" */;
@@ -193,8 +277,10 @@
 			projectDirPath = "";
 			projectRoot = "";
 			targets = (
-				EEBCC9D719CC627D0083B827 /* Snap */,
-				EEBCC9E119CC627D0083B827 /* SnapTests */,
+				EEBCC9D719CC627D0083B827 /* Snap iOS */,
+				EECDB3791AC0C9D4006BBC11 /* Snap OSX */,
+				EEBCC9E119CC627D0083B827 /* Snap iOS Tests */,
+				EECDB3831AC0C9D4006BBC11 /* Snap OSX Tests */,
 			);
 		};
 /* End PBXProject section */
@@ -214,6 +300,20 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		EECDB3781AC0C9D4006BBC11 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		EECDB3821AC0C9D4006BBC11 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
@@ -221,14 +321,14 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				EEBCC9F019CC64F80083B827 /* EdgeInsets.swift in Sources */,
-				EEBCC9F619CC65200083B827 /* ConstraintRelation.swift in Sources */,
-				EEBCC9F419CC65110083B827 /* ConstraintAttributes.swift in Sources */,
-				EEBCC9FE19CC65510083B827 /* LayoutConstraint.swift in Sources */,
-				EEBCC9FC19CC65430083B827 /* ConstraintMaker.swift in Sources */,
-				EEBCC9F219CC65050083B827 /* View+Snap.swift in Sources */,
-				EEBCCA0019CC66020083B827 /* Constraint.swift in Sources */,
-				EEBCC9F819CC65260083B827 /* ConstraintItem.swift in Sources */,
+				EECDB36C1AC0C9A6006BBC11 /* Constraint.swift in Sources */,
+				EECDB3701AC0C9A6006BBC11 /* ConstraintRelation.swift in Sources */,
+				EECDB3731AC0C9A6006BBC11 /* View+Snap.swift in Sources */,
+				EECDB3711AC0C9A6006BBC11 /* EdgeInsets.swift in Sources */,
+				EECDB36F1AC0C9A6006BBC11 /* ConstraintMaker.swift in Sources */,
+				EECDB36D1AC0C9A6006BBC11 /* ConstraintAttributes.swift in Sources */,
+				EECDB3721AC0C9A6006BBC11 /* LayoutConstraint.swift in Sources */,
+				EECDB36E1AC0C9A6006BBC11 /* ConstraintItem.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -236,12 +336,43 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				EEAED5491A8F56BF00777EF9 /* SnapTests.swift in Sources */,
+				EECDB3931AC0CB52006BBC11 /* Tests.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		EECDB3751AC0C9D4006BBC11 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EECDB3951AC0CBFF006BBC11 /* Constraint.swift in Sources */,
+				EECDB3991AC0CBFF006BBC11 /* ConstraintRelation.swift in Sources */,
+				EECDB39C1AC0CBFF006BBC11 /* View+Snap.swift in Sources */,
+				EECDB39A1AC0CBFF006BBC11 /* EdgeInsets.swift in Sources */,
+				EECDB3981AC0CBFF006BBC11 /* ConstraintMaker.swift in Sources */,
+				EECDB3961AC0CBFF006BBC11 /* ConstraintAttributes.swift in Sources */,
+				EECDB39B1AC0CBFF006BBC11 /* LayoutConstraint.swift in Sources */,
+				EECDB3971AC0CBFF006BBC11 /* ConstraintItem.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		EECDB3801AC0C9D4006BBC11 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				EECDB3941AC0CB52006BBC11 /* Tests.swift in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 /* End PBXSourcesBuildPhase section */
 
+/* Begin PBXTargetDependency section */
+		EECDB3871AC0C9D4006BBC11 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = EECDB3791AC0C9D4006BBC11 /* Snap OSX */;
+			targetProxy = EECDB3861AC0C9D4006BBC11 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
 /* Begin XCBuildConfiguration section */
 		DDC9FDAF1981B4DD009612C7 /* Debug */ = {
 			isa = XCBuildConfiguration;
@@ -330,15 +461,10 @@
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				INFOPLIST_FILE = Snap/Info.plist;
+				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
+				PRODUCT_NAME = Snap;
 				SKIP_INSTALL = YES;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
@@ -353,11 +479,10 @@
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
-				INFOPLIST_FILE = Snap/Info.plist;
+				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
+				PRODUCT_NAME = Snap;
 				SKIP_INSTALL = YES;
 				VERSIONING_SYSTEM = "apple-generic";
 				VERSION_INFO_PREFIX = "";
@@ -371,12 +496,7 @@
 					"$(SDKROOT)/Developer/Library/Frameworks",
 					"$(inherited)",
 				);
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				INFOPLIST_FILE = SnapTests/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
@@ -389,13 +509,95 @@
 					"$(SDKROOT)/Developer/Library/Frameworks",
 					"$(inherited)",
 				);
-				INFOPLIST_FILE = SnapTests/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 			};
 			name = Release;
 		};
+		EECDB38E1AC0C9D4006BBC11 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				FRAMEWORK_VERSION = A;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.10;
+				PRODUCT_NAME = Snap;
+				SDKROOT = macosx;
+				SKIP_INSTALL = YES;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Debug;
+		};
+		EECDB38F1AC0C9D4006BBC11 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEFINES_MODULE = YES;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				FRAMEWORK_VERSION = A;
+				INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.10;
+				PRODUCT_NAME = Snap;
+				SDKROOT = macosx;
+				SKIP_INSTALL = YES;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Release;
+		};
+		EECDB3911AC0C9D4006BBC11 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(DEVELOPER_FRAMEWORKS_DIR)",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.10;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		EECDB3921AC0C9D4006BBC11 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				COMBINE_HIDPI_IMAGES = YES;
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(DEVELOPER_FRAMEWORKS_DIR)",
+					"$(inherited)",
+				);
+				INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist";
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
+				MACOSX_DEPLOYMENT_TARGET = 10.10;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
 /* End XCBuildConfiguration section */
 
 /* Begin XCConfigurationList section */
@@ -408,7 +610,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		EEBCC9E819CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap" */ = {
+		EEBCC9E819CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap iOS" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				EEBCC9E919CC627E0083B827 /* Debug */,
@@ -417,7 +619,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		EEBCC9EB19CC627E0083B827 /* Build configuration list for PBXNativeTarget "SnapTests" */ = {
+		EEBCC9EB19CC627E0083B827 /* Build configuration list for PBXNativeTarget "Snap iOS Tests" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				EEBCC9EC19CC627E0083B827 /* Debug */,
@@ -426,6 +628,22 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		EECDB38D1AC0C9D4006BBC11 /* Build configuration list for PBXNativeTarget "Snap OSX" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				EECDB38E1AC0C9D4006BBC11 /* Debug */,
+				EECDB38F1AC0C9D4006BBC11 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
+		EECDB3901AC0C9D4006BBC11 /* Build configuration list for PBXNativeTarget "Snap OSX Tests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				EECDB3911AC0C9D4006BBC11 /* Debug */,
+				EECDB3921AC0C9D4006BBC11 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+		};
 /* End XCConfigurationList section */
 	};
 	rootObject = DDC9FD8D1981B4DD009612C7 /* Project object */;

+ 110 - 0
Snap.xcodeproj/xcshareddata/xcschemes/Snap OSX.xcscheme

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0620"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "EECDB3791AC0C9D4006BBC11"
+               BuildableName = "Snap.framework"
+               BlueprintName = "Snap OSX"
+               ReferencedContainer = "container:Snap.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "NO"
+            buildForArchiving = "NO"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "EECDB3831AC0C9D4006BBC11"
+               BuildableName = "Snap OSX Tests.xctest"
+               BlueprintName = "Snap OSX Tests"
+               ReferencedContainer = "container:Snap.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      buildConfiguration = "Debug">
+      <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "EECDB3831AC0C9D4006BBC11"
+               BuildableName = "Snap OSX Tests.xctest"
+               BlueprintName = "Snap OSX Tests"
+               ReferencedContainer = "container:Snap.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "EECDB3791AC0C9D4006BBC11"
+            BuildableName = "Snap.framework"
+            BlueprintName = "Snap OSX"
+            ReferencedContainer = "container:Snap.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </TestAction>
+   <LaunchAction
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Debug"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      allowLocationSimulation = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "EECDB3791AC0C9D4006BBC11"
+            BuildableName = "Snap.framework"
+            BlueprintName = "Snap OSX"
+            ReferencedContainer = "container:Snap.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      buildConfiguration = "Release"
+      debugDocumentVersioning = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "EECDB3791AC0C9D4006BBC11"
+            BuildableName = "Snap.framework"
+            BlueprintName = "Snap OSX"
+            ReferencedContainer = "container:Snap.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 37 - 4
Snap.xcodeproj/xcshareddata/xcschemes/Snap.xcscheme → Snap.xcodeproj/xcshareddata/xcschemes/Snap iOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
-   LastUpgradeVersion = "0610"
+   LastUpgradeVersion = "0620"
    version = "1.3">
    <BuildAction
       parallelizeBuildables = "YES"
@@ -16,7 +16,21 @@
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "EEBCC9D719CC627D0083B827"
                BuildableName = "Snap.framework"
-               BlueprintName = "Snap"
+               BlueprintName = "Snap iOS"
+               ReferencedContainer = "container:Snap.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "NO"
+            buildForArchiving = "NO"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "EEBCC9E119CC627D0083B827"
+               BuildableName = "Snap iOS Tests.xctest"
+               BlueprintName = "Snap iOS Tests"
                ReferencedContainer = "container:Snap.xcodeproj">
             </BuildableReference>
          </BuildActionEntry>
@@ -28,7 +42,26 @@
       shouldUseLaunchSchemeArgsEnv = "YES"
       buildConfiguration = "Debug">
       <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "EEBCC9E119CC627D0083B827"
+               BuildableName = "Snap iOS Tests.xctest"
+               BlueprintName = "Snap iOS Tests"
+               ReferencedContainer = "container:Snap.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "EEBCC9D719CC627D0083B827"
+            BuildableName = "Snap.framework"
+            BlueprintName = "Snap iOS"
+            ReferencedContainer = "container:Snap.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
    </TestAction>
    <LaunchAction
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -44,7 +77,7 @@
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "EEBCC9D719CC627D0083B827"
             BuildableName = "Snap.framework"
-            BlueprintName = "Snap"
+            BlueprintName = "Snap iOS"
             ReferencedContainer = "container:Snap.xcodeproj">
          </BuildableReference>
       </MacroExpansion>
@@ -62,7 +95,7 @@
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "EEBCC9D719CC627D0083B827"
             BuildableName = "Snap.framework"
-            BlueprintName = "Snap"
+            BlueprintName = "Snap iOS"
             ReferencedContainer = "container:Snap.xcodeproj">
          </BuildableReference>
       </MacroExpansion>

+ 7 - 0
Snap.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "container:Snap.xcodeproj">
+   </FileRef>
+</Workspace>

+ 41 - 0
Snap.xcworkspace/xcshareddata/Snap.xccheckout

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDESourceControlProjectFavoriteDictionaryKey</key>
+	<false/>
+	<key>IDESourceControlProjectIdentifier</key>
+	<string>A81B1AD2-2D5B-4BB2-AAA6-86A53AADC474</string>
+	<key>IDESourceControlProjectName</key>
+	<string>Snap</string>
+	<key>IDESourceControlProjectOriginsDictionary</key>
+	<dict>
+		<key>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</key>
+		<string>github.com:Masonry/Snap.git</string>
+	</dict>
+	<key>IDESourceControlProjectPath</key>
+	<string>Snap.xcworkspace</string>
+	<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+	<dict>
+		<key>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</key>
+		<string>..</string>
+	</dict>
+	<key>IDESourceControlProjectURL</key>
+	<string>github.com:Masonry/Snap.git</string>
+	<key>IDESourceControlProjectVersion</key>
+	<integer>111</integer>
+	<key>IDESourceControlProjectWCCIdentifier</key>
+	<string>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</string>
+	<key>IDESourceControlProjectWCConfigurations</key>
+	<array>
+		<dict>
+			<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+			<string>public.vcs.git</string>
+			<key>IDESourceControlWCCIdentifierKey</key>
+			<string>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</string>
+			<key>IDESourceControlWCCName</key>
+			<string>Snap</string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 41 - 0
Snap.xcworkspace/xcshareddata/Snappy.xccheckout

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDESourceControlProjectFavoriteDictionaryKey</key>
+	<false/>
+	<key>IDESourceControlProjectIdentifier</key>
+	<string>FDF6DE8D-A35D-47D4-8CB6-ACB35050F0D0</string>
+	<key>IDESourceControlProjectName</key>
+	<string>Snap</string>
+	<key>IDESourceControlProjectOriginsDictionary</key>
+	<dict>
+		<key>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</key>
+		<string>github.com:Masonry/Snap.git</string>
+	</dict>
+	<key>IDESourceControlProjectPath</key>
+	<string>Snap.xcodeproj</string>
+	<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
+	<dict>
+		<key>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</key>
+		<string>../..</string>
+	</dict>
+	<key>IDESourceControlProjectURL</key>
+	<string>github.com:Masonry/Snap.git</string>
+	<key>IDESourceControlProjectVersion</key>
+	<integer>111</integer>
+	<key>IDESourceControlProjectWCCIdentifier</key>
+	<string>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</string>
+	<key>IDESourceControlProjectWCConfigurations</key>
+	<array>
+		<dict>
+			<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
+			<string>public.vcs.git</string>
+			<key>IDESourceControlWCCIdentifierKey</key>
+			<string>3AF18F9C6F5D633BAA0B3F935459E0C777C82047</string>
+			<key>IDESourceControlWCCName</key>
+			<string>Snap</string>
+		</dict>
+	</array>
+</dict>
+</plist>

+ 0 - 0
Snap/Constraint.swift → Source/Constraint.swift


+ 0 - 0
Snap/ConstraintAttributes.swift → Source/ConstraintAttributes.swift


+ 0 - 0
Snap/ConstraintItem.swift → Source/ConstraintItem.swift


+ 0 - 0
Snap/ConstraintMaker.swift → Source/ConstraintMaker.swift


+ 0 - 0
Snap/ConstraintRelation.swift → Source/ConstraintRelation.swift


+ 0 - 0
Snap/EdgeInsets.swift → Source/EdgeInsets.swift


+ 0 - 0
Snap/Info.plist → Source/Info.plist


+ 0 - 0
Snap/LayoutConstraint.swift → Source/LayoutConstraint.swift


+ 1 - 4
Snap/Snap.h → Source/Snap.h

@@ -21,10 +21,7 @@
 //  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 //  THE SOFTWARE.
 
-#import <UIKit/UIKit.h>
+#import <Foundation/Foundation.h>
 
-//! Project version number for Snap.
 FOUNDATION_EXPORT double SnapVersionNumber;
-
-//! Project version string for Snap.
 FOUNDATION_EXPORT const unsigned char SnapVersionString[];

+ 0 - 0
Snap/View+Snap.swift → Source/View+Snap.swift


+ 24 - 0
Tests/Info.plist

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.masonry.$(PRODUCT_NAME:rfc1034identifier)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>$(PRODUCT_NAME)</string>
+	<key>CFBundlePackageType</key>
+	<string>BNDL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+</dict>
+</plist>

+ 40 - 35
SnapTests/SnapTests.swift → Tests/Tests.swift

@@ -1,18 +1,23 @@
-//
-//  SnapTests.swift
-//  SnapTests
-//
-//  Created by Robert Payne on 20/09/14.
-//  Copyright (c) 2014 Jonas Budelmann. All rights reserved.
-//
-
+#if os(iOS)
 import UIKit
+typealias View = UIView
+extension View {
+    var snp_constraints: [AnyObject] { return self.constraints() }
+}
+#else
+import AppKit
+typealias View = NSView
+extension View {
+    var snp_constraints: [AnyObject] { return self.constraints }
+}
+#endif
+
 import XCTest
 import Snap
 
 class SnapTests: XCTestCase {
     
-    let container = UIView()
+    let container = View()
     
     override func setUp() {
         super.setUp()
@@ -25,8 +30,8 @@ class SnapTests: XCTestCase {
     }
     
     func testMakeConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -36,20 +41,20 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 2, "Should have 2 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 2, "Should have 2 constraints installed")
         
         v2.snp_makeConstraints { (make) -> Void in
             make.edges.equalTo(v1)
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 6, "Should have 6 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 6, "Should have 6 constraints installed")
         
     }
     
     func testUpdateConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -59,20 +64,20 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 2, "Should have 2 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 2, "Should have 2 constraints installed")
         
         v1.snp_updateConstraints { (make) -> Void in
             make.top.equalTo(v2.snp_top).offset(15)
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 2, "Should still have 2 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 2, "Should still have 2 constraints installed")
         
     }
     
     func testRemakeConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -82,20 +87,20 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 2, "Should have 2 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 2, "Should have 2 constraints installed")
         
         v1.snp_remakeConstraints { (make) -> Void in
             make.edges.equalTo(v2)
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 4, "Should have 4 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 4, "Should have 4 constraints installed")
         
     }
     
     func testRemoveConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -105,17 +110,17 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 2, "Should have 2 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 2, "Should have 2 constraints installed")
         
         v1.snp_removeConstraints()
         
-        XCTAssertEqual(self.container.constraints().count, 0, "Should have 0 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 0, "Should have 0 constraints installed")
         
     }
     
     func testPrepareConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -124,25 +129,25 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 0, "Should have 0 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 0, "Should have 0 constraints installed")
         
         for constraint in constraints {
             constraint.install()
         }
         
-        XCTAssertEqual(self.container.constraints().count, 4, "Should have 4 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 4, "Should have 4 constraints installed")
         
         for constraint in constraints {
             constraint.uninstall()
         }
         
-        XCTAssertEqual(self.container.constraints().count, 0, "Should have 0 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 0, "Should have 0 constraints installed")
         
     }
     
     func testReinstallConstraints() {
-        let v1 = UIView()
-        let v2 = UIView()
+        let v1 = View()
+        let v2 = View()
         self.container.addSubview(v1)
         self.container.addSubview(v2)
         
@@ -151,19 +156,19 @@ class SnapTests: XCTestCase {
             return
         }
         
-        XCTAssertEqual(self.container.constraints().count, 0, "Should have 0 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 0, "Should have 0 constraints installed")
         
         for constraint in constraints {
             constraint.install()
         }
         
-        XCTAssertEqual(self.container.constraints().count, 4, "Should have 4 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 4, "Should have 4 constraints installed")
         
         for constraint in constraints {
             constraint.install()
         }
         
-        XCTAssertEqual(self.container.constraints().count, 4, "Should have 0 constraints installed")
+        XCTAssertEqual(self.container.snp_constraints.count, 4, "Should have 0 constraints installed")
     }
     
 }