Skip to content

Commit

Permalink
Merge pull request #8 from Weebly/swift-4
Browse files Browse the repository at this point in the history
Xcode 9 and Swift 3/4 Compatibility
  • Loading branch information
eddiekaiger authored Sep 13, 2017
2 parents 669e30b + 35fddfa commit b7ab461
Show file tree
Hide file tree
Showing 14 changed files with 474 additions and 212 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1
4.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode8.3
osx_image: xcode9

env:
- PLATFORM=iOS DESTINATION='platform=iOS Simulator,name=iPhone 6S'
Expand Down
4 changes: 2 additions & 2 deletions AnchorKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "AnchorKit"
s.version = "1.0.1"
s.version = "2.0.0"
s.summary = "A Swifty anchor-based API for AutoLayout."

s.description = <<-DESC
Expand All @@ -20,7 +20,7 @@ Pod::Spec.new do |s|
s.osx.deployment_target = "10.11"
s.tvos.deployment_target = "9.0"

s.source = { :git => "https://github.com/Weebly/AnchorKit.git", :tag => "v1.0.1" }
s.source = { :git => "https://github.com/Weebly/AnchorKit.git", :tag => "v2.0.0" }
s.requires_arc = true
s.source_files = "AnchorKit/Source/*.swift"

Expand Down
102 changes: 61 additions & 41 deletions AnchorKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
C04E70051ECFBF1100749438 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04E6FFF1ECFBF1100749438 /* ViewController.swift */; };
C04E700A1ECFBF2200749438 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C04E70061ECFBF2200749438 /* LaunchScreen.storyboard */; };
C04E700B1ECFBF2200749438 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C04E70081ECFBF2200749438 /* Main.storyboard */; };
C0A26A2F1F571A1F000E1F7C /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A291F571A1F000E1F7C /* Anchor.swift */; };
C0A26A301F571A1F000E1F7C /* Anchorable+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */; };
C0A26A311F571A1F000E1F7C /* Anchorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */; };
C0A26A321F571A1F000E1F7C /* CGFloatRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */; };
C0A26A331F571A1F000E1F7C /* LayoutPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */; };
C0A26A341F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */; };
C05749D91F571B5900E54255 /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D21F571B4D00E54255 /* Anchor.swift */; };
C05749DA1F571B5900E54255 /* Anchorable+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */; };
C05749DB1F571B5900E54255 /* Anchorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D41F571B4D00E54255 /* Anchorable.swift */; };
C05749DC1F571B5900E54255 /* CGFloatRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */; };
C05749DD1F571B5900E54255 /* LayoutPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D61F571B4D00E54255 /* LayoutPriority.swift */; };
C05749DE1F571B5900E54255 /* NSLayoutConstraint+AnchorKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */; };
C05749DF1F571B5900E54255 /* SystemSpacingPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */; };
C0E1C9541DD319D50068E85C /* AnchorKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0E1C94B1DD319D50068E85C /* AnchorKit.framework */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -52,12 +53,13 @@
C04E6FFF1ECFBF1100749438 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = "AnchorKit-iOS/ViewController.swift"; sourceTree = SOURCE_ROOT; };
C04E70071ECFBF2200749438 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "AnchorKit-iOS/Base.lproj/LaunchScreen.storyboard"; sourceTree = SOURCE_ROOT; };
C04E70091ECFBF2200749438 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "AnchorKit-iOS/Base.lproj/Main.storyboard"; sourceTree = SOURCE_ROOT; };
C0A26A291F571A1F000E1F7C /* Anchor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = "<group>"; };
C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Anchorable+Constraints.swift"; sourceTree = "<group>"; };
C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Anchorable.swift; sourceTree = "<group>"; };
C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloatRepresentable.swift; sourceTree = "<group>"; };
C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutPriority.swift; sourceTree = "<group>"; };
C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+AnchorKit.swift"; sourceTree = "<group>"; };
C05749D21F571B4D00E54255 /* Anchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = "<group>"; };
C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Anchorable+Constraints.swift"; sourceTree = "<group>"; };
C05749D41F571B4D00E54255 /* Anchorable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchorable.swift; sourceTree = "<group>"; };
C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGFloatRepresentable.swift; sourceTree = "<group>"; };
C05749D61F571B4D00E54255 /* LayoutPriority.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutPriority.swift; sourceTree = "<group>"; };
C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+AnchorKit.swift"; sourceTree = "<group>"; };
C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemSpacingPosition.swift; sourceTree = "<group>"; };
C0E1C94B1DD319D50068E85C /* AnchorKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AnchorKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C0E1C9531DD319D50068E85C /* AnchorKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnchorKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -103,10 +105,25 @@
path = "Anchor-iOS";
sourceTree = "<group>";
};
C05749D11F571B4D00E54255 /* Source */ = {
isa = PBXGroup;
children = (
C05749D21F571B4D00E54255 /* Anchor.swift */,
C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */,
C05749D41F571B4D00E54255 /* Anchorable.swift */,
C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */,
C05749D61F571B4D00E54255 /* LayoutPriority.swift */,
C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */,
C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */,
);
name = Source;
path = AnchorKit/Source;
sourceTree = SOURCE_ROOT;
};
C07218141E722070000A0F0B /* AnchorKit */ = {
isa = PBXGroup;
children = (
C0A26A281F571A1F000E1F7C /* Source */,
C05749D11F571B4D00E54255 /* Source */,
C04E6FD31ECFBE5F00749438 /* AnchorKit.h */,
C04E6FD81ECFBE5F00749438 /* Info.plist */,
);
Expand All @@ -127,20 +144,6 @@
path = AnchorTests;
sourceTree = "<group>";
};
C0A26A281F571A1F000E1F7C /* Source */ = {
isa = PBXGroup;
children = (
C0A26A291F571A1F000E1F7C /* Anchor.swift */,
C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */,
C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */,
C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */,
C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */,
C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */,
);
name = Source;
path = AnchorKit/Source;
sourceTree = SOURCE_ROOT;
};
C0E211401D9EC5C000623F02 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -235,7 +238,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Eddie Kaiger";
TargetAttributes = {
C01EC55F1E8F002500BEBB0F = {
Expand All @@ -246,7 +249,7 @@
};
C0E1C94A1DD319D50068E85C = {
CreatedOnToolsVersion = 8.1;
LastSwiftMigration = 0810;
LastSwiftMigration = 0900;
ProvisioningStyle = Manual;
};
C0E1C9521DD319D50068E85C = {
Expand Down Expand Up @@ -318,12 +321,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C0A26A311F571A1F000E1F7C /* Anchorable.swift in Sources */,
C0A26A341F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift in Sources */,
C0A26A321F571A1F000E1F7C /* CGFloatRepresentable.swift in Sources */,
C0A26A2F1F571A1F000E1F7C /* Anchor.swift in Sources */,
C0A26A331F571A1F000E1F7C /* LayoutPriority.swift in Sources */,
C0A26A301F571A1F000E1F7C /* Anchorable+Constraints.swift in Sources */,
C05749DB1F571B5900E54255 /* Anchorable.swift in Sources */,
C05749DE1F571B5900E54255 /* NSLayoutConstraint+AnchorKit.swift in Sources */,
C05749DC1F571B5900E54255 /* CGFloatRepresentable.swift in Sources */,
C05749D91F571B5900E54255 /* Anchor.swift in Sources */,
C05749DD1F571B5900E54255 /* LayoutPriority.swift in Sources */,
C05749DA1F571B5900E54255 /* Anchorable+Constraints.swift in Sources */,
C05749DF1F571B5900E54255 /* SystemSpacingPosition.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -381,8 +385,9 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.Weebly.Anchor-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
Expand All @@ -399,7 +404,8 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.Weebly.Anchor-iOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand All @@ -420,7 +426,7 @@
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
PRODUCT_NAME = AnchorKit;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
};
name = Debug;
};
Expand All @@ -441,7 +447,7 @@
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
PRODUCT_NAME = AnchorKit;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
};
name = Release;
};
Expand All @@ -456,7 +462,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = com.Weebly.AnchorKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Debug;
Expand All @@ -472,7 +478,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = com.Weebly.AnchorKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
TVOS_DEPLOYMENT_TARGET = 10.0;
};
name = Release;
Expand All @@ -486,15 +492,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
Expand Down Expand Up @@ -526,6 +538,7 @@
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3";
TVOS_DEPLOYMENT_TARGET = 9.0;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -542,15 +555,21 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
Expand All @@ -574,6 +593,7 @@
PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL;
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2,3";
TVOS_DEPLOYMENT_TARGET = 9.0;
VALIDATE_PRODUCT = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0830"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading

0 comments on commit b7ab461

Please sign in to comment.