diff --git a/README.md b/README.md
index ab7b523..9839cb4 100644
--- a/README.md
+++ b/README.md
@@ -6,27 +6,23 @@ 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
-
-_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 [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 project1.
-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`.
-
-1It's important you add Snap as a subproject of your Xcode Project and not of a potential Xcode Workspace containing your project
-
-## Installation (Cocoapods pre-release)
+## Installation Cocoapods
1. Add Snap as a line in your Podfile `pod 'Snap'`
2. Run `pod install`
3. Add `import Snap` to your `AppDelegate.swift`
+Cocoapods installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets.
+
+## Installation Carthage
+
+Carthage is supported by adding `github 'Masonry/Snap'` to your Cartfile.
+
+Carthage installations only work for iOS 8.0 and OS X 10.10 or higher deployment targets.
+
## What's wrong with NSLayoutConstraints?
Under the hood Auto Layout is a powerful and flexible way of organising and laying out your views. However creating constraints from code is verbose and not very descriptive.
diff --git a/Snap OSX/Info.plist b/Snap OSX/Info.plist
new file mode 100644
index 0000000..13371dd
--- /dev/null
+++ b/Snap OSX/Info.plist
@@ -0,0 +1,28 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ com.masonry.$(PRODUCT_NAME:rfc1034identifier)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(CURRENT_PROJECT_VERSION)
+ NSHumanReadableCopyright
+ Copyright © 2015 Jonas Budelmann. All rights reserved.
+ NSPrincipalClass
+
+
+
diff --git a/Snap OSX/Snap OSX.h b/Snap OSX/Snap OSX.h
new file mode 100644
index 0000000..4cb292f
--- /dev/null
+++ b/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
+
+//! 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
+
+
diff --git a/SnapTests/Info.plist b/Snap OSXTests/Info.plist
similarity index 100%
rename from SnapTests/Info.plist
rename to Snap OSXTests/Info.plist
diff --git a/Snap OSXTests/Snap_OSXTests.swift b/Snap OSXTests/Snap_OSXTests.swift
new file mode 100644
index 0000000..25781f7
--- /dev/null
+++ b/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.
+ }
+ }
+
+}
diff --git a/Snap.xcodeproj/project.pbxproj b/Snap.xcodeproj/project.pbxproj
index 70f4e6f..54cb8db 100644
--- a/Snap.xcodeproj/project.pbxproj
+++ b/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 = ""; };
- EE91728219CB304E007888CF /* Snap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Snap.h; sourceTree = ""; };
- EE91728B19CB304E007888CF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- EE91728C19CB304E007888CF /* SnapTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapTests.swift; sourceTree = ""; };
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 = ""; };
- EEBCC9F119CC65040083B827 /* View+Snap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "View+Snap.swift"; sourceTree = ""; };
- EEBCC9F319CC65110083B827 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintAttributes.swift; sourceTree = ""; };
- EEBCC9F519CC65200083B827 /* ConstraintRelation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintRelation.swift; sourceTree = ""; };
- EEBCC9F719CC65260083B827 /* ConstraintItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintItem.swift; sourceTree = ""; };
- EEBCC9FB19CC65430083B827 /* ConstraintMaker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConstraintMaker.swift; sourceTree = ""; };
- EEBCC9FD19CC65510083B827 /* LayoutConstraint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutConstraint.swift; sourceTree = ""; };
- EEBCC9FF19CC66020083B827 /* Constraint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constraint.swift; sourceTree = ""; };
+ 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 = ""; };
+ EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintAttributes.swift; sourceTree = ""; };
+ EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintItem.swift; sourceTree = ""; };
+ EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintMaker.swift; sourceTree = ""; };
+ EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConstraintRelation.swift; sourceTree = ""; };
+ EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EdgeInsets.swift; sourceTree = ""; };
+ EECDB3641AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutConstraint.swift; sourceTree = ""; };
+ EECDB3661AC0C95C006BBC11 /* Snap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Snap.h; sourceTree = ""; };
+ EECDB3671AC0C95C006BBC11 /* View+Snap.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Snap.swift"; sourceTree = ""; };
+ EECDB3691AC0C95C006BBC11 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ EECDB36A1AC0C95C006BBC11 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; };
+ 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 = "";
@@ -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 = "";
};
- EE91727F19CB304E007888CF /* Snap */ = {
+ EECDB35D1AC0C95C006BBC11 /* Source */ = {
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 */,
+ 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 */,
);
- path = Snap;
+ path = Source;
sourceTree = "";
};
- EE91728019CB304E007888CF /* Supporting Files */ = {
+ EECDB3681AC0C95C006BBC11 /* Tests */ = {
isa = PBXGroup;
children = (
- EE91728119CB304E007888CF /* Info.plist */,
+ EECDB3691AC0C95C006BBC11 /* Info.plist */,
+ EECDB36A1AC0C95C006BBC11 /* Tests.swift */,
);
- name = "Supporting Files";
+ path = Tests;
sourceTree = "";
};
- EE91728919CB304E007888CF /* SnapTests */ = {
+ EECDB36B1AC0C967006BBC11 /* Supporting Files */ = {
isa = PBXGroup;
children = (
- EE91728C19CB304E007888CF /* SnapTests.swift */,
- EE91728A19CB304E007888CF /* Supporting Files */,
- );
- path = SnapTests;
- sourceTree = "";
- };
- EE91728A19CB304E007888CF /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- EE91728B19CB304E007888CF /* Info.plist */,
+ EECDB3641AC0C95C006BBC11 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "";
@@ -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 */;
diff --git a/Snap.xcodeproj/xcshareddata/xcschemes/Snap OSX.xcscheme b/Snap.xcodeproj/xcshareddata/xcschemes/Snap OSX.xcscheme
new file mode 100644
index 0000000..cf8990d
--- /dev/null
+++ b/Snap.xcodeproj/xcshareddata/xcschemes/Snap OSX.xcscheme
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Snap.xcodeproj/xcshareddata/xcschemes/Snap.xcscheme b/Snap.xcodeproj/xcshareddata/xcschemes/Snap iOS.xcscheme
similarity index 62%
rename from Snap.xcodeproj/xcshareddata/xcschemes/Snap.xcscheme
rename to Snap.xcodeproj/xcshareddata/xcschemes/Snap iOS.xcscheme
index 851ed42..f33a6f1 100644
--- a/Snap.xcodeproj/xcshareddata/xcschemes/Snap.xcscheme
+++ b/Snap.xcodeproj/xcshareddata/xcschemes/Snap iOS.xcscheme
@@ -1,6 +1,6 @@
+
+
+
+
@@ -28,7 +42,26 @@
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
+
+
+
+
+
+
+
+
@@ -62,7 +95,7 @@
BuildableIdentifier = "primary"
BlueprintIdentifier = "EEBCC9D719CC627D0083B827"
BuildableName = "Snap.framework"
- BlueprintName = "Snap"
+ BlueprintName = "Snap iOS"
ReferencedContainer = "container:Snap.xcodeproj">
diff --git a/Snap.xcworkspace/contents.xcworkspacedata b/Snap.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..8ae6f15
--- /dev/null
+++ b/Snap.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Snap.xcworkspace/xcshareddata/Snap.xccheckout b/Snap.xcworkspace/xcshareddata/Snap.xccheckout
new file mode 100644
index 0000000..19c212e
--- /dev/null
+++ b/Snap.xcworkspace/xcshareddata/Snap.xccheckout
@@ -0,0 +1,41 @@
+
+
+
+
+ IDESourceControlProjectFavoriteDictionaryKey
+
+ IDESourceControlProjectIdentifier
+ A81B1AD2-2D5B-4BB2-AAA6-86A53AADC474
+ IDESourceControlProjectName
+ Snap
+ IDESourceControlProjectOriginsDictionary
+
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ github.com:Masonry/Snap.git
+
+ IDESourceControlProjectPath
+ Snap.xcworkspace
+ IDESourceControlProjectRelativeInstallPathDictionary
+
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ ..
+
+ IDESourceControlProjectURL
+ github.com:Masonry/Snap.git
+ IDESourceControlProjectVersion
+ 111
+ IDESourceControlProjectWCCIdentifier
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ IDESourceControlProjectWCConfigurations
+
+
+ IDESourceControlRepositoryExtensionIdentifierKey
+ public.vcs.git
+ IDESourceControlWCCIdentifierKey
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ IDESourceControlWCCName
+ Snap
+
+
+
+
diff --git a/Snap.xcworkspace/xcshareddata/Snappy.xccheckout b/Snap.xcworkspace/xcshareddata/Snappy.xccheckout
new file mode 100644
index 0000000..91c9f46
--- /dev/null
+++ b/Snap.xcworkspace/xcshareddata/Snappy.xccheckout
@@ -0,0 +1,41 @@
+
+
+
+
+ IDESourceControlProjectFavoriteDictionaryKey
+
+ IDESourceControlProjectIdentifier
+ FDF6DE8D-A35D-47D4-8CB6-ACB35050F0D0
+ IDESourceControlProjectName
+ Snap
+ IDESourceControlProjectOriginsDictionary
+
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ github.com:Masonry/Snap.git
+
+ IDESourceControlProjectPath
+ Snap.xcodeproj
+ IDESourceControlProjectRelativeInstallPathDictionary
+
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ ../..
+
+ IDESourceControlProjectURL
+ github.com:Masonry/Snap.git
+ IDESourceControlProjectVersion
+ 111
+ IDESourceControlProjectWCCIdentifier
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ IDESourceControlProjectWCConfigurations
+
+
+ IDESourceControlRepositoryExtensionIdentifierKey
+ public.vcs.git
+ IDESourceControlWCCIdentifierKey
+ 3AF18F9C6F5D633BAA0B3F935459E0C777C82047
+ IDESourceControlWCCName
+ Snap
+
+
+
+
diff --git a/Snap/Constraint.swift b/Source/Constraint.swift
similarity index 100%
rename from Snap/Constraint.swift
rename to Source/Constraint.swift
diff --git a/Snap/ConstraintAttributes.swift b/Source/ConstraintAttributes.swift
similarity index 100%
rename from Snap/ConstraintAttributes.swift
rename to Source/ConstraintAttributes.swift
diff --git a/Snap/ConstraintItem.swift b/Source/ConstraintItem.swift
similarity index 100%
rename from Snap/ConstraintItem.swift
rename to Source/ConstraintItem.swift
diff --git a/Snap/ConstraintMaker.swift b/Source/ConstraintMaker.swift
similarity index 100%
rename from Snap/ConstraintMaker.swift
rename to Source/ConstraintMaker.swift
diff --git a/Snap/ConstraintRelation.swift b/Source/ConstraintRelation.swift
similarity index 100%
rename from Snap/ConstraintRelation.swift
rename to Source/ConstraintRelation.swift
diff --git a/Snap/EdgeInsets.swift b/Source/EdgeInsets.swift
similarity index 100%
rename from Snap/EdgeInsets.swift
rename to Source/EdgeInsets.swift
diff --git a/Snap/Info.plist b/Source/Info.plist
similarity index 100%
rename from Snap/Info.plist
rename to Source/Info.plist
diff --git a/Snap/LayoutConstraint.swift b/Source/LayoutConstraint.swift
similarity index 100%
rename from Snap/LayoutConstraint.swift
rename to Source/LayoutConstraint.swift
diff --git a/Snap/Snap.h b/Source/Snap.h
similarity index 88%
rename from Snap/Snap.h
rename to Source/Snap.h
index c534bca..0b37559 100644
--- a/Snap/Snap.h
+++ b/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
+#import
-//! Project version number for Snap.
FOUNDATION_EXPORT double SnapVersionNumber;
-
-//! Project version string for Snap.
FOUNDATION_EXPORT const unsigned char SnapVersionString[];
\ No newline at end of file
diff --git a/Snap/View+Snap.swift b/Source/View+Snap.swift
similarity index 100%
rename from Snap/View+Snap.swift
rename to Source/View+Snap.swift
diff --git a/Tests/Info.plist b/Tests/Info.plist
new file mode 100644
index 0000000..1235593
--- /dev/null
+++ b/Tests/Info.plist
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ com.masonry.$(PRODUCT_NAME:rfc1034identifier)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+
+
diff --git a/SnapTests/SnapTests.swift b/Tests/Tests.swift
similarity index 61%
rename from SnapTests/SnapTests.swift
rename to Tests/Tests.swift
index 50b41ca..ddbd86c 100644
--- a/SnapTests/SnapTests.swift
+++ b/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")
}
}