From 02a0b2d2b7303782ce348869c12e67a9d5f019b9 Mon Sep 17 00:00:00 2001 From: Robert Payne Date: Sat, 8 Oct 2016 00:11:36 +1300 Subject: [PATCH] 3.0.2 Release (#347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update ISSUE_TEMPLATE.md * Update ISSUE_TEMPLATE.md * Update ISSUE_TEMPLATE.md * Update ISSUE_TEMPLATE.md * Update ISSUE_TEMPLATE.md * fix "Mutating a priority from required to not on an installed constra… (#323) * fix "Mutating a priority from required to not on an installed constraint (or vice-versa) is not supported." when the priority is not changed * add more check when changing layout constraint priority * add more lenient check when changing layout constraint priority * fix UILayoutPriorityRequired available only on iOS * fix undeclared UILayoutPriority on macOS * add check for tvOS * change the result constraint of maker.center.equalTo(CGPoint) to based on the original point of superview (#336) * change center.equalTo * fix logic * Add ConstraintMaker shortcuts for superview access (#341) Added two new shortcuts for access superview in ConstraintMakerRelatable `greaterThanOrEqualToSuperview` `lessThanOrEqualToSuperview` * Add `topMargin` to constraint maker (#343) * Fix erroneus scheme * Update settings for Carthage * Prepare 3.0.2 release --- ISSUE_TEMPLATE.md | 4 +++ README.md | 4 +-- SnapKit.podspec | 4 +-- SnapKit.xcodeproj/project.pbxproj | 34 ++++++++----------- .../xcshareddata/xcschemes/SnapKit.xcscheme | 14 -------- Source/Constraint.swift | 18 ++++++++-- Source/ConstraintMaker.swift | 5 +++ Source/ConstraintMakerRelatable.swift | 15 ++++++++ 8 files changed, 58 insertions(+), 40 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index 941fdc6..f8adfec 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,7 +1,10 @@ ### New Issue Checklist +🚫 If this template is not filled out your issue **will** be closed with no comment. 🚫 + * [ ] I have looked at the [Documentation](http://snapkit.io/docs) * [ ] I have read the [F.A.Q.](http://snapkit.io/faq) +* [ ] I have filled out this issue template. ### Issue Info @@ -15,3 +18,4 @@ ### Issue Description +⚠️ Replace this with the description of your issue. ⚠️ diff --git a/README.md b/README.md index 0e5ac50..8b14ba8 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'SnapKit', '~> 3.0' + pod 'SnapKit', '~> 3.0.2' end ``` @@ -83,7 +83,7 @@ $ brew install carthage To integrate SnapKit into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "SnapKit/SnapKit" ~> 3.0 +github "SnapKit/SnapKit" ~> 3.0.2 ``` Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project. diff --git a/SnapKit.podspec b/SnapKit.podspec index c720499..5b2e9c5 100644 --- a/SnapKit.podspec +++ b/SnapKit.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = 'SnapKit' - s.version = '3.0.1' + s.version = '3.0.2' 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 => '3.0.1' } + s.source = { :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '3.0.2' } s.ios.deployment_target = '8.0' s.osx.deployment_target = '10.11' diff --git a/SnapKit.xcodeproj/project.pbxproj b/SnapKit.xcodeproj/project.pbxproj index e7480f6..321270f 100644 --- a/SnapKit.xcodeproj/project.pbxproj +++ b/SnapKit.xcodeproj/project.pbxproj @@ -413,8 +413,8 @@ 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"; COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -436,11 +436,12 @@ MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; + PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL; + SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvsimulator appletvos"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2,3,4"; + TVOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; }; @@ -461,8 +462,8 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -476,11 +477,11 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.10; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvsimulator appletvos macosx"; + PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL; + SUPPORTED_PLATFORMS = "macosx iphonesimulator iphoneos appletvsimulator appletvos"; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2,3,4"; - VALIDATE_PRODUCT = YES; + TVOS_DEPLOYMENT_TARGET = 9.0; }; name = Release; }; @@ -489,20 +490,17 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.0.0; DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; 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.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK; PRODUCT_NAME = SnapKit; - SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Debug; }; @@ -511,20 +509,16 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 1.0.0; DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; 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.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK; PRODUCT_NAME = SnapKit; - SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; }; name = Release; }; diff --git a/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme b/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme index c8f3ec9..0e9a1a7 100644 --- a/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme +++ b/SnapKit.xcodeproj/xcshareddata/xcschemes/SnapKit.xcscheme @@ -20,20 +20,6 @@ ReferencedContainer = "container:SnapKit.xcodeproj"> - - - - ConstraintMakerEditable { + guard let other = self.description.view.superview else { + fatalError("Expected superview but found nil when attempting make constraint `lessThanOrEqualToSuperview`.") + } + return self.relatedTo(other, relation: .lessThanOrEqual, file: file, line: line) + } + @discardableResult public func greaterThanOrEqualTo(_ other: ConstraintRelatableTarget, _ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) } + @discardableResult + public func greaterThanOrEqualToSuperview(_ file: String = #file, line: UInt = #line) -> ConstraintMakerEditable { + guard let other = self.description.view.superview else { + fatalError("Expected superview but found nil when attempting make constraint `greaterThanOrEqualToSuperview`.") + } + return self.relatedTo(other, relation: .greaterThanOrEqual, file: file, line: line) + } }