From 298472bb0b750641a8b52e786f366d2b4459a431 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Wed, 27 Jan 2016 00:14:18 +1300 Subject: [PATCH 1/9] Added size tests --- Tests/Tests.swift | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Tests/Tests.swift b/Tests/Tests.swift index 9749fda..e21c85d 100644 --- a/Tests/Tests.swift +++ b/Tests/Tests.swift @@ -227,4 +227,26 @@ class SnapKitTests: XCTestCase { } + func testSizeConstraints() { + let view = View() + self.container.addSubview(view) + + view.snp_makeConstraints { (make) -> Void in + make.size.equalTo(CGSizeMake(50, 50)) + make.left.top.equalTo(self.container) + } + + XCTAssertEqual(view.snp_constraints.count, 2, "Should have 2 constraints") + + XCTAssertEqual(self.container.snp_constraints.count, 2, "Should have 2 constraints") + + + let constraints = view.snp_constraints as! [NSLayoutConstraint] + + XCTAssertEqual(constraints[0].firstAttribute, NSLayoutAttribute.Width, "Should be width") + XCTAssertEqual(constraints[1].firstAttribute, NSLayoutAttribute.Height, "Should be height") + XCTAssertEqual(constraints[0].constant, 50, "Should be 50") + XCTAssertEqual(constraints[1].constant, 50, "Should be 50") + } + } From aaccbd929a0e6d63570010d732cb13d175279794 Mon Sep 17 00:00:00 2001 From: gitpark Date: Fri, 11 Dec 2015 11:32:46 +0800 Subject: [PATCH 2/9] Create Package.swift --- Package.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..1aecb9d --- /dev/null +++ b/Package.swift @@ -0,0 +1,13 @@ +/* + This source file is part of the Swift.org open source project + Copyright 2015 Apple Inc. and the Swift project authors + Licensed under Apache License v2.0 with Runtime Library Exception + See http://swift.org/LICENSE.txt for license information + See http://swift.org/CONTRIBUTORS.txt for Swift project authors +*/ + +import PackageDescription + +let package = Package( + name: "SnapKit" +) From d92a31605287493f619c7013d4b277c9700b86ab Mon Sep 17 00:00:00 2001 From: eralpkaraduman Date: Thu, 31 Dec 2015 23:10:03 +0200 Subject: [PATCH 3/9] Added tvOS target added tvOS test target # Conflicts: # SnapKit.xcodeproj/project.pbxproj --- SnapKit.xcodeproj/project.pbxproj | 232 +++++++++++++++++- .../xcschemes/SnapKit tvOS.xcscheme | 99 ++++++++ 2 files changed, 330 insertions(+), 1 deletion(-) create mode 100644 SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit tvOS.xcscheme diff --git a/SnapKit.xcodeproj/project.pbxproj b/SnapKit.xcodeproj/project.pbxproj index 4b6c8f7..63b1d2a 100644 --- a/SnapKit.xcodeproj/project.pbxproj +++ b/SnapKit.xcodeproj/project.pbxproj @@ -7,6 +7,25 @@ objects = { /* Begin PBXBuildFile section */ + 537DCE9B1C35CD4100B5B899 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537DCE9A1C35CD4100B5B899 /* UIKit.framework */; }; + 537DCE9C1C35CD9A00B5B899 /* Constraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35E1AC0C95C006BBC11 /* Constraint.swift */; }; + 537DCE9D1C35CDA300B5B899 /* SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEFCF32E1AD926AE00A425FA /* SnapKit.swift */; }; + 537DCE9E1C35CDAA00B5B899 /* Debugging.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEFCF32B1AD910B900A425FA /* Debugging.swift */; }; + 537DCE9F1C35CDB700B5B899 /* ConstraintItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3601AC0C95C006BBC11 /* ConstraintItem.swift */; }; + 537DCEA01C35CDF800B5B899 /* SnapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = EECDB3661AC0C95C006BBC11 /* SnapKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 537DCEA11C35CE0000B5B899 /* ConstraintDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEFCF3311AD9432400A425FA /* ConstraintDescription.swift */; }; + 537DCEA21C35CE0500B5B899 /* ConstraintMaker.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3611AC0C95C006BBC11 /* ConstraintMaker.swift */; }; + 537DCEA31C35CE0900B5B899 /* View+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3671AC0C95C006BBC11 /* View+SnapKit.swift */; }; + 537DCEA41C35CE1500B5B899 /* ViewController+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE4910971B19A26000A54F1F /* ViewController+SnapKit.swift */; }; + 537DCEA51C35CE1B00B5B899 /* EdgeInsets.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3631AC0C95C006BBC11 /* EdgeInsets.swift */; }; + 537DCEA61C35CE2000B5B899 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */; }; + 537DCEA81C35CE3800B5B899 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */; }; + 537DCEA91C35CE3E00B5B899 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */; }; + 537DCEAA1C35CE4800B5B899 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; + 537DCEB41C35D90A00B5B899 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537DCE921C35CC8800B5B899 /* SnapKit.framework */; }; + 537DCEBA1C35DA9700B5B899 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB36A1AC0C95C006BBC11 /* Tests.swift */; }; + 779230441BCB6FC30027CF5F /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; + 779230451BCB6FC30027CF5F /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; EE4910981B19A26000A54F1F /* ViewController+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE4910971B19A26000A54F1F /* ViewController+SnapKit.swift */; }; EE4910991B19A40200A54F1F /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEBCC9D819CC627D0083B827 /* SnapKit.framework */; }; EE94F6091AC0F10A008767FF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE94F6081AC0F10A008767FF /* UIKit.framework */; }; @@ -51,6 +70,10 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 537DCE921C35CC8800B5B899 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 537DCE9A1C35CD4100B5B899 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.1.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 537DCEAF1C35D90A00B5B899 /* SnapKit tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SnapKit tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 779230431BCB6FC30027CF5F /* SourceLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourceLocation.swift; sourceTree = ""; }; EE4910971B19A26000A54F1F /* ViewController+SnapKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ViewController+SnapKit.swift"; sourceTree = ""; }; EE94F6081AC0F10A008767FF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; EE94F60A1AC0F10F008767FF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; @@ -76,6 +99,22 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 537DCE8E1C35CC8800B5B899 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 537DCE9B1C35CD4100B5B899 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 537DCEAC1C35D90A00B5B899 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 537DCEB41C35D90A00B5B899 /* SnapKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; EE94F60D1AC0F132008767FF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -127,6 +166,8 @@ EEBCC9E219CC627E0083B827 /* SnapKit iOS Tests.xctest */, EECDB37A1AC0C9D4006BBC11 /* SnapKit.framework */, EECDB3841AC0C9D4006BBC11 /* SnapKit OSX Tests.xctest */, + 537DCE921C35CC8800B5B899 /* SnapKit.framework */, + 537DCEAF1C35D90A00B5B899 /* SnapKit tvOS Tests.xctest */, ); name = Products; sourceTree = ""; @@ -134,6 +175,7 @@ EE94F60C1AC0F113008767FF /* Frameworks */ = { isa = PBXGroup; children = ( + 537DCE9A1C35CD4100B5B899 /* UIKit.framework */, EE94F60A1AC0F10F008767FF /* AppKit.framework */, EE94F6081AC0F10A008767FF /* UIKit.framework */, ); @@ -183,6 +225,14 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ + 537DCE8F1C35CC8800B5B899 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 537DCEA01C35CDF800B5B899 /* SnapKit.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; EEBCC9D519CC627D0083B827 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -202,6 +252,41 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ + 537DCE911C35CC8800B5B899 /* SnapKit tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 537DCE991C35CC8800B5B899 /* Build configuration list for PBXNativeTarget "SnapKit tvOS" */; + buildPhases = ( + 537DCE8D1C35CC8800B5B899 /* Sources */, + 537DCE8E1C35CC8800B5B899 /* Frameworks */, + 537DCE8F1C35CC8800B5B899 /* Headers */, + 537DCE901C35CC8800B5B899 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SnapKit tvOS"; + productName = "SnapKit tvOS"; + productReference = 537DCE921C35CC8800B5B899 /* SnapKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 537DCEAE1C35D90A00B5B899 /* SnapKit tvOS Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 537DCEB91C35D90A00B5B899 /* Build configuration list for PBXNativeTarget "SnapKit tvOS Tests" */; + buildPhases = ( + 537DCEAB1C35D90A00B5B899 /* Sources */, + 537DCEAC1C35D90A00B5B899 /* Frameworks */, + 537DCEAD1C35D90A00B5B899 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "SnapKit tvOS Tests"; + productName = "SnapKit tvOS Tests"; + productReference = 537DCEAF1C35D90A00B5B899 /* SnapKit tvOS Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; EEBCC9D719CC627D0083B827 /* SnapKit iOS */ = { isa = PBXNativeTarget; buildConfigurationList = EEBCC9E819CC627E0083B827 /* Build configuration list for PBXNativeTarget "SnapKit iOS" */; @@ -279,10 +364,16 @@ DDC9FD8D1981B4DD009612C7 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0700; + LastSwiftUpdateCheck = 0720; LastUpgradeCheck = 0700; ORGANIZATIONNAME = "SnapKit Team"; TargetAttributes = { + 537DCE911C35CC8800B5B899 = { + CreatedOnToolsVersion = 7.2; + }; + 537DCEAE1C35D90A00B5B899 = { + CreatedOnToolsVersion = 7.2; + }; EEBCC9D719CC627D0083B827 = { CreatedOnToolsVersion = 6.0; }; @@ -311,14 +402,30 @@ projectRoot = ""; targets = ( EEBCC9D719CC627D0083B827 /* SnapKit iOS */, + 537DCE911C35CC8800B5B899 /* SnapKit tvOS */, EECDB3791AC0C9D4006BBC11 /* SnapKit OSX */, EEBCC9E119CC627D0083B827 /* SnapKit iOS Tests */, + 537DCEAE1C35D90A00B5B899 /* SnapKit tvOS Tests */, EECDB3831AC0C9D4006BBC11 /* SnapKit OSX Tests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 537DCE901C35CC8800B5B899 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 537DCEAD1C35D90A00B5B899 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; EEBCC9D619CC627D0083B827 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -350,6 +457,34 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 537DCE8D1C35CC8800B5B899 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 537DCEA61C35CE2000B5B899 /* LayoutConstraint.swift in Sources */, + 537DCE9F1C35CDB700B5B899 /* ConstraintItem.swift in Sources */, + 537DCEA81C35CE3800B5B899 /* ConstraintRelation.swift in Sources */, + 537DCE9D1C35CDA300B5B899 /* SnapKit.swift in Sources */, + 537DCEA51C35CE1B00B5B899 /* EdgeInsets.swift in Sources */, + 537DCE9C1C35CD9A00B5B899 /* Constraint.swift in Sources */, + 537DCEA41C35CE1500B5B899 /* ViewController+SnapKit.swift in Sources */, + 537DCE9E1C35CDAA00B5B899 /* Debugging.swift in Sources */, + 537DCEA11C35CE0000B5B899 /* ConstraintDescription.swift in Sources */, + 537DCEAA1C35CE4800B5B899 /* SourceLocation.swift in Sources */, + 537DCEA91C35CE3E00B5B899 /* ConstraintAttributes.swift in Sources */, + 537DCEA31C35CE0900B5B899 /* View+SnapKit.swift in Sources */, + 537DCEA21C35CE0500B5B899 /* ConstraintMaker.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 537DCEAB1C35D90A00B5B899 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 537DCEBA1C35DA9700B5B899 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; EEBCC9D319CC627D0083B827 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -414,6 +549,84 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ + 537DCE971C35CC8800B5B899 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.snapkit.SnapKit; + PRODUCT_NAME = SnapKit; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 537DCE981C35CC8800B5B899 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + 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"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.snapkit.SnapKit; + PRODUCT_NAME = SnapKit; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 537DCEB71C35D90A00B5B899 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = dwarf; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "io.snapkit.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TVOS_DEPLOYMENT_TARGET = 9.1; + }; + name = Debug; + }; + 537DCEB81C35D90A00B5B899 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "$(SRCROOT)/Tests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "io.snapkit.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TVOS_DEPLOYMENT_TARGET = 9.1; + }; + name = Release; + }; DDC9FDAF1981B4DD009612C7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -646,6 +859,23 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 537DCE991C35CC8800B5B899 /* Build configuration list for PBXNativeTarget "SnapKit tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 537DCE971C35CC8800B5B899 /* Debug */, + 537DCE981C35CC8800B5B899 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 537DCEB91C35D90A00B5B899 /* Build configuration list for PBXNativeTarget "SnapKit tvOS Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 537DCEB71C35D90A00B5B899 /* Debug */, + 537DCEB81C35D90A00B5B899 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; DDC9FD901981B4DD009612C7 /* Build configuration list for PBXProject "SnapKit" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit tvOS.xcscheme b/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit tvOS.xcscheme new file mode 100644 index 0000000..2ba998f --- /dev/null +++ b/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit tvOS.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From a3824e54a0ee0bf12324ee00c7e35dc6b5abe564 Mon Sep 17 00:00:00 2001 From: Stephen Yao Date: Wed, 6 Jan 2016 14:21:26 +1100 Subject: [PATCH 4/9] Changed code-signing to iOS-distribution for Release target --- SnapKit.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SnapKit.xcodeproj/project.pbxproj b/SnapKit.xcodeproj/project.pbxproj index 63b1d2a..4e8f593 100644 --- a/SnapKit.xcodeproj/project.pbxproj +++ b/SnapKit.xcodeproj/project.pbxproj @@ -689,7 +689,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; From 121058af733382baf373b899455665d3054c1ebd Mon Sep 17 00:00:00 2001 From: Ray Lillywhite Date: Thu, 7 Jan 2016 13:52:28 -0800 Subject: [PATCH 5/9] Fix handling of UIEdgeInsets for width and height --- Source/Constraint.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Constraint.swift b/Source/Constraint.swift index c7ae413..5d57e02 100644 --- a/Source/Constraint.swift +++ b/Source/Constraint.swift @@ -443,7 +443,9 @@ private extension NSLayoutAttribute { case .Bottom, .BottomMargin: return insets.bottom case .Leading, .LeadingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left - case .Width, .Height, .NotAnAttribute: return CGFloat(0) + case .Width: return -insets.left + insets.right + case .Height: return -insets.top + insets.bottom + case .NotAnAttribute: return CGFloat(0) } #else switch self { @@ -453,7 +455,9 @@ private extension NSLayoutAttribute { case .Bottom: return insets.bottom case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left - case .Width, .Height, .NotAnAttribute: return CGFloat(0) + case .Width: return -insets.left + insets.right + case .Height: return -insets.top + insets.bottom + case .NotAnAttribute: return CGFloat(0) case .FirstBaseline: return insets.bottom } #endif From 245a5fcf6e1a7836d984b49a432f99e47f1c5aed Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Thu, 21 Jan 2016 11:06:31 +1300 Subject: [PATCH 6/9] Update license file on Package.swift --- Package.swift | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index 1aecb9d..2e87314 100644 --- a/Package.swift +++ b/Package.swift @@ -1,10 +1,26 @@ -/* - This source file is part of the Swift.org open source project - Copyright 2015 Apple Inc. and the Swift project authors - Licensed under Apache License v2.0 with Runtime Library Exception - See http://swift.org/LICENSE.txt for license information - See http://swift.org/CONTRIBUTORS.txt for Swift project authors -*/ +// +// SnapKit +// +// Copyright (c) 2011-Present SnapKit Team - https://github.com/SnapKit +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + import PackageDescription From 856ed42160a86337c9c0e5f58d5413d0c3337812 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Thu, 21 Jan 2016 11:19:01 +1300 Subject: [PATCH 7/9] Bump versioning for 0.19.0 release # Conflicts: # SnapKit.podspec --- CHANGELOG.md | 9 ++++++++- SnapKit.podspec | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f228f5..b7575ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ======= +# 0.19.0 - January 21 2015 + +* Improved `.insets()` for `width` and `height` #183 +* Added Carthage tvOS support #179 +* Added Package.swift #175 +* Codesign is set to Distribution on Release #181 + # 0.15.0 - September 22 2015 * Fixed issues with layout guides on iOS 9 @@ -36,4 +43,4 @@ CHANGELOG * Re-worked some internal API to allow for future updates * Added `snp_prepareConstraints -> [Constraint]` which allows pre-building of constraints -* Added a fatal error to `and` when it is used after relation has been set \ No newline at end of file +* Added a fatal error to `and` when it is used after relation has been set diff --git a/SnapKit.podspec b/SnapKit.podspec index af6b9e0..2e63a5b 100644 --- a/SnapKit.podspec +++ b/SnapKit.podspec @@ -1,17 +1,17 @@ Pod::Spec.new do |s| s.name = 'SnapKit' - s.version = '0.16.0' + s.version = '0.19.0' s.license = 'MIT' s.summary = 'Harness the power of auto layout with a simplified, chainable, and compile time safe syntax.' s.homepage = 'https://github.com/SnapKit/SnapKit' s.authors = { 'Robert Payne' => 'robertpayne@me.com' } s.social_media_url = 'http://twitter.com/robertjpayne' - s.source = { :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '0.16.0' } + s.source = { :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '0.19.0' } s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' s.tvos.deployment_target = '9.0' - + s.source_files = 'Source/*.swift' s.requires_arc = true From 0be780c930e2768e6f28d37acb6d2fba6b8b287f Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Wed, 27 Jan 2016 00:22:50 +1300 Subject: [PATCH 8/9] Prepare 0.19.1 Release --- CHANGELOG.md | 6 +++++- SnapKit.podspec | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7575ac..bfc53df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ CHANGELOG ======= -# 0.19.0 - January 21 2015 +# 0.19.1 - January 26 2016 + +* Rebased from 0.16.0 with only desired commits to resolve many unexpected issues + +# 0.19.0 - January 21 2016 * Improved `.insets()` for `width` and `height` #183 * Added Carthage tvOS support #179 diff --git a/SnapKit.podspec b/SnapKit.podspec index 2e63a5b..5f69fa7 100644 --- a/SnapKit.podspec +++ b/SnapKit.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'SnapKit' - s.version = '0.19.0' + s.version = '0.19.1' s.license = 'MIT' s.summary = 'Harness the power of auto layout with a simplified, chainable, and compile time safe syntax.' s.homepage = 'https://github.com/SnapKit/SnapKit' s.authors = { 'Robert Payne' => 'robertpayne@me.com' } s.social_media_url = 'http://twitter.com/robertjpayne' - s.source = { :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '0.19.0' } + s.source = { :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '0.19.1' } s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.10' From 1a1592e04e2155c2920eb44a67006738744523f8 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Wed, 27 Jan 2016 00:23:37 +1300 Subject: [PATCH 9/9] Fix up bad tvOS target --- SnapKit.xcodeproj/project.pbxproj | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/SnapKit.xcodeproj/project.pbxproj b/SnapKit.xcodeproj/project.pbxproj index 4e8f593..7bdc1f9 100644 --- a/SnapKit.xcodeproj/project.pbxproj +++ b/SnapKit.xcodeproj/project.pbxproj @@ -21,11 +21,8 @@ 537DCEA61C35CE2000B5B899 /* LayoutConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3651AC0C95C006BBC11 /* LayoutConstraint.swift */; }; 537DCEA81C35CE3800B5B899 /* ConstraintRelation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB3621AC0C95C006BBC11 /* ConstraintRelation.swift */; }; 537DCEA91C35CE3E00B5B899 /* ConstraintAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB35F1AC0C95C006BBC11 /* ConstraintAttributes.swift */; }; - 537DCEAA1C35CE4800B5B899 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; 537DCEB41C35D90A00B5B899 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537DCE921C35CC8800B5B899 /* SnapKit.framework */; }; 537DCEBA1C35DA9700B5B899 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EECDB36A1AC0C95C006BBC11 /* Tests.swift */; }; - 779230441BCB6FC30027CF5F /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; - 779230451BCB6FC30027CF5F /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 779230431BCB6FC30027CF5F /* SourceLocation.swift */; }; EE4910981B19A26000A54F1F /* ViewController+SnapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE4910971B19A26000A54F1F /* ViewController+SnapKit.swift */; }; EE4910991B19A40200A54F1F /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEBCC9D819CC627D0083B827 /* SnapKit.framework */; }; EE94F6091AC0F10A008767FF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EE94F6081AC0F10A008767FF /* UIKit.framework */; }; @@ -73,7 +70,6 @@ 537DCE921C35CC8800B5B899 /* SnapKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SnapKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 537DCE9A1C35CD4100B5B899 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.1.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 537DCEAF1C35D90A00B5B899 /* SnapKit tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SnapKit tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 779230431BCB6FC30027CF5F /* SourceLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourceLocation.swift; sourceTree = ""; }; EE4910971B19A26000A54F1F /* ViewController+SnapKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ViewController+SnapKit.swift"; sourceTree = ""; }; EE94F6081AC0F10A008767FF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; EE94F60A1AC0F10F008767FF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; @@ -470,7 +466,6 @@ 537DCEA41C35CE1500B5B899 /* ViewController+SnapKit.swift in Sources */, 537DCE9E1C35CDAA00B5B899 /* Debugging.swift in Sources */, 537DCEA11C35CE0000B5B899 /* ConstraintDescription.swift in Sources */, - 537DCEAA1C35CE4800B5B899 /* SourceLocation.swift in Sources */, 537DCEA91C35CE3E00B5B899 /* ConstraintAttributes.swift in Sources */, 537DCEA31C35CE0900B5B899 /* View+SnapKit.swift in Sources */, 537DCEA21C35CE0500B5B899 /* ConstraintMaker.swift in Sources */, @@ -875,6 +870,7 @@ 537DCEB81C35D90A00B5B899 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; DDC9FD901981B4DD009612C7 /* Build configuration list for PBXProject "SnapKit" */ = { isa = XCConfigurationList;