Skip to content

Commit b7ab461

Browse files
authored
Merge pull request #8 from Weebly/swift-4
Xcode 9 and Swift 3/4 Compatibility
2 parents 669e30b + 35fddfa commit b7ab461

14 files changed

+474
-212
lines changed

Diff for: .swift-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1
1+
4.0

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode8.3
2+
osx_image: xcode9
33

44
env:
55
- PLATFORM=iOS DESTINATION='platform=iOS Simulator,name=iPhone 6S'

Diff for: AnchorKit.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "AnchorKit"
4-
s.version = "1.0.1"
4+
s.version = "2.0.0"
55
s.summary = "A Swifty anchor-based API for AutoLayout."
66

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

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

Diff for: AnchorKit.xcodeproj/project.pbxproj

+61-41
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
C04E70051ECFBF1100749438 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04E6FFF1ECFBF1100749438 /* ViewController.swift */; };
1919
C04E700A1ECFBF2200749438 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C04E70061ECFBF2200749438 /* LaunchScreen.storyboard */; };
2020
C04E700B1ECFBF2200749438 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C04E70081ECFBF2200749438 /* Main.storyboard */; };
21-
C0A26A2F1F571A1F000E1F7C /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A291F571A1F000E1F7C /* Anchor.swift */; };
22-
C0A26A301F571A1F000E1F7C /* Anchorable+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */; };
23-
C0A26A311F571A1F000E1F7C /* Anchorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */; };
24-
C0A26A321F571A1F000E1F7C /* CGFloatRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */; };
25-
C0A26A331F571A1F000E1F7C /* LayoutPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */; };
26-
C0A26A341F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */; };
21+
C05749D91F571B5900E54255 /* Anchor.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D21F571B4D00E54255 /* Anchor.swift */; };
22+
C05749DA1F571B5900E54255 /* Anchorable+Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */; };
23+
C05749DB1F571B5900E54255 /* Anchorable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D41F571B4D00E54255 /* Anchorable.swift */; };
24+
C05749DC1F571B5900E54255 /* CGFloatRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */; };
25+
C05749DD1F571B5900E54255 /* LayoutPriority.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D61F571B4D00E54255 /* LayoutPriority.swift */; };
26+
C05749DE1F571B5900E54255 /* NSLayoutConstraint+AnchorKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */; };
27+
C05749DF1F571B5900E54255 /* SystemSpacingPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */; };
2728
C0E1C9541DD319D50068E85C /* AnchorKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0E1C94B1DD319D50068E85C /* AnchorKit.framework */; };
2829
/* End PBXBuildFile section */
2930

@@ -52,12 +53,13 @@
5253
C04E6FFF1ECFBF1100749438 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = "AnchorKit-iOS/ViewController.swift"; sourceTree = SOURCE_ROOT; };
5354
C04E70071ECFBF2200749438 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "AnchorKit-iOS/Base.lproj/LaunchScreen.storyboard"; sourceTree = SOURCE_ROOT; };
5455
C04E70091ECFBF2200749438 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "AnchorKit-iOS/Base.lproj/Main.storyboard"; sourceTree = SOURCE_ROOT; };
55-
C0A26A291F571A1F000E1F7C /* Anchor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = "<group>"; };
56-
C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Anchorable+Constraints.swift"; sourceTree = "<group>"; };
57-
C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Anchorable.swift; sourceTree = "<group>"; };
58-
C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGFloatRepresentable.swift; sourceTree = "<group>"; };
59-
C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LayoutPriority.swift; sourceTree = "<group>"; };
60-
C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+AnchorKit.swift"; sourceTree = "<group>"; };
56+
C05749D21F571B4D00E54255 /* Anchor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchor.swift; sourceTree = "<group>"; };
57+
C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Anchorable+Constraints.swift"; sourceTree = "<group>"; };
58+
C05749D41F571B4D00E54255 /* Anchorable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Anchorable.swift; sourceTree = "<group>"; };
59+
C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGFloatRepresentable.swift; sourceTree = "<group>"; };
60+
C05749D61F571B4D00E54255 /* LayoutPriority.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayoutPriority.swift; sourceTree = "<group>"; };
61+
C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+AnchorKit.swift"; sourceTree = "<group>"; };
62+
C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SystemSpacingPosition.swift; sourceTree = "<group>"; };
6163
C0E1C94B1DD319D50068E85C /* AnchorKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AnchorKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6264
C0E1C9531DD319D50068E85C /* AnchorKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnchorKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6365
/* End PBXFileReference section */
@@ -103,10 +105,25 @@
103105
path = "Anchor-iOS";
104106
sourceTree = "<group>";
105107
};
108+
C05749D11F571B4D00E54255 /* Source */ = {
109+
isa = PBXGroup;
110+
children = (
111+
C05749D21F571B4D00E54255 /* Anchor.swift */,
112+
C05749D31F571B4D00E54255 /* Anchorable+Constraints.swift */,
113+
C05749D41F571B4D00E54255 /* Anchorable.swift */,
114+
C05749D51F571B4D00E54255 /* CGFloatRepresentable.swift */,
115+
C05749D61F571B4D00E54255 /* LayoutPriority.swift */,
116+
C05749D71F571B4D00E54255 /* NSLayoutConstraint+AnchorKit.swift */,
117+
C05749D81F571B4D00E54255 /* SystemSpacingPosition.swift */,
118+
);
119+
name = Source;
120+
path = AnchorKit/Source;
121+
sourceTree = SOURCE_ROOT;
122+
};
106123
C07218141E722070000A0F0B /* AnchorKit */ = {
107124
isa = PBXGroup;
108125
children = (
109-
C0A26A281F571A1F000E1F7C /* Source */,
126+
C05749D11F571B4D00E54255 /* Source */,
110127
C04E6FD31ECFBE5F00749438 /* AnchorKit.h */,
111128
C04E6FD81ECFBE5F00749438 /* Info.plist */,
112129
);
@@ -127,20 +144,6 @@
127144
path = AnchorTests;
128145
sourceTree = "<group>";
129146
};
130-
C0A26A281F571A1F000E1F7C /* Source */ = {
131-
isa = PBXGroup;
132-
children = (
133-
C0A26A291F571A1F000E1F7C /* Anchor.swift */,
134-
C0A26A2A1F571A1F000E1F7C /* Anchorable+Constraints.swift */,
135-
C0A26A2B1F571A1F000E1F7C /* Anchorable.swift */,
136-
C0A26A2C1F571A1F000E1F7C /* CGFloatRepresentable.swift */,
137-
C0A26A2D1F571A1F000E1F7C /* LayoutPriority.swift */,
138-
C0A26A2E1F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift */,
139-
);
140-
name = Source;
141-
path = AnchorKit/Source;
142-
sourceTree = SOURCE_ROOT;
143-
};
144147
C0E211401D9EC5C000623F02 = {
145148
isa = PBXGroup;
146149
children = (
@@ -235,7 +238,7 @@
235238
isa = PBXProject;
236239
attributes = {
237240
LastSwiftUpdateCheck = 0820;
238-
LastUpgradeCheck = 0800;
241+
LastUpgradeCheck = 0900;
239242
ORGANIZATIONNAME = "Eddie Kaiger";
240243
TargetAttributes = {
241244
C01EC55F1E8F002500BEBB0F = {
@@ -246,7 +249,7 @@
246249
};
247250
C0E1C94A1DD319D50068E85C = {
248251
CreatedOnToolsVersion = 8.1;
249-
LastSwiftMigration = 0810;
252+
LastSwiftMigration = 0900;
250253
ProvisioningStyle = Manual;
251254
};
252255
C0E1C9521DD319D50068E85C = {
@@ -318,12 +321,13 @@
318321
isa = PBXSourcesBuildPhase;
319322
buildActionMask = 2147483647;
320323
files = (
321-
C0A26A311F571A1F000E1F7C /* Anchorable.swift in Sources */,
322-
C0A26A341F571A1F000E1F7C /* NSLayoutConstraint+AnchorKit.swift in Sources */,
323-
C0A26A321F571A1F000E1F7C /* CGFloatRepresentable.swift in Sources */,
324-
C0A26A2F1F571A1F000E1F7C /* Anchor.swift in Sources */,
325-
C0A26A331F571A1F000E1F7C /* LayoutPriority.swift in Sources */,
326-
C0A26A301F571A1F000E1F7C /* Anchorable+Constraints.swift in Sources */,
324+
C05749DB1F571B5900E54255 /* Anchorable.swift in Sources */,
325+
C05749DE1F571B5900E54255 /* NSLayoutConstraint+AnchorKit.swift in Sources */,
326+
C05749DC1F571B5900E54255 /* CGFloatRepresentable.swift in Sources */,
327+
C05749D91F571B5900E54255 /* Anchor.swift in Sources */,
328+
C05749DD1F571B5900E54255 /* LayoutPriority.swift in Sources */,
329+
C05749DA1F571B5900E54255 /* Anchorable+Constraints.swift in Sources */,
330+
C05749DF1F571B5900E54255 /* SystemSpacingPosition.swift in Sources */,
327331
);
328332
runOnlyForDeploymentPostprocessing = 0;
329333
};
@@ -381,8 +385,9 @@
381385
PRODUCT_BUNDLE_IDENTIFIER = "com.Weebly.Anchor-iOS";
382386
PRODUCT_NAME = "$(TARGET_NAME)";
383387
SDKROOT = iphoneos;
388+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
384389
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
385-
SWIFT_VERSION = 3.0;
390+
TARGETED_DEVICE_FAMILY = "1,2";
386391
};
387392
name = Debug;
388393
};
@@ -399,7 +404,8 @@
399404
PRODUCT_BUNDLE_IDENTIFIER = "com.Weebly.Anchor-iOS";
400405
PRODUCT_NAME = "$(TARGET_NAME)";
401406
SDKROOT = iphoneos;
402-
SWIFT_VERSION = 3.0;
407+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
408+
TARGETED_DEVICE_FAMILY = "1,2";
403409
};
404410
name = Release;
405411
};
@@ -420,7 +426,7 @@
420426
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
421427
PRODUCT_NAME = AnchorKit;
422428
SKIP_INSTALL = YES;
423-
SWIFT_VERSION = 3.0;
429+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
424430
};
425431
name = Debug;
426432
};
@@ -441,7 +447,7 @@
441447
PRODUCT_BUNDLE_PACKAGE_TYPE = FMWK;
442448
PRODUCT_NAME = AnchorKit;
443449
SKIP_INSTALL = YES;
444-
SWIFT_VERSION = 3.0;
450+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
445451
};
446452
name = Release;
447453
};
@@ -456,7 +462,7 @@
456462
MACOSX_DEPLOYMENT_TARGET = 10.12;
457463
PRODUCT_BUNDLE_IDENTIFIER = com.Weebly.AnchorKitTests;
458464
PRODUCT_NAME = "$(TARGET_NAME)";
459-
SWIFT_VERSION = 3.0;
465+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
460466
TVOS_DEPLOYMENT_TARGET = 10.0;
461467
};
462468
name = Debug;
@@ -472,7 +478,7 @@
472478
MACOSX_DEPLOYMENT_TARGET = 10.12;
473479
PRODUCT_BUNDLE_IDENTIFIER = com.Weebly.AnchorKitTests;
474480
PRODUCT_NAME = "$(TARGET_NAME)";
475-
SWIFT_VERSION = 3.0;
481+
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
476482
TVOS_DEPLOYMENT_TARGET = 10.0;
477483
};
478484
name = Release;
@@ -486,15 +492,21 @@
486492
CLANG_CXX_LIBRARY = "libc++";
487493
CLANG_ENABLE_MODULES = YES;
488494
CLANG_ENABLE_OBJC_ARC = YES;
495+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
489496
CLANG_WARN_BOOL_CONVERSION = YES;
497+
CLANG_WARN_COMMA = YES;
490498
CLANG_WARN_CONSTANT_CONVERSION = YES;
491499
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
492500
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
493501
CLANG_WARN_EMPTY_BODY = YES;
494502
CLANG_WARN_ENUM_CONVERSION = YES;
495503
CLANG_WARN_INFINITE_RECURSION = YES;
496504
CLANG_WARN_INT_CONVERSION = YES;
505+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
506+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
497507
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
508+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
509+
CLANG_WARN_STRICT_PROTOTYPES = YES;
498510
CLANG_WARN_SUSPICIOUS_MOVE = YES;
499511
CLANG_WARN_SUSPICIOUS_MOVES = YES;
500512
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -526,6 +538,7 @@
526538
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
527539
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
528540
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
541+
SWIFT_VERSION = 4.0;
529542
TARGETED_DEVICE_FAMILY = "1,2,3";
530543
TVOS_DEPLOYMENT_TARGET = 9.0;
531544
VERSIONING_SYSTEM = "apple-generic";
@@ -542,15 +555,21 @@
542555
CLANG_CXX_LIBRARY = "libc++";
543556
CLANG_ENABLE_MODULES = YES;
544557
CLANG_ENABLE_OBJC_ARC = YES;
558+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
545559
CLANG_WARN_BOOL_CONVERSION = YES;
560+
CLANG_WARN_COMMA = YES;
546561
CLANG_WARN_CONSTANT_CONVERSION = YES;
547562
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
548563
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
549564
CLANG_WARN_EMPTY_BODY = YES;
550565
CLANG_WARN_ENUM_CONVERSION = YES;
551566
CLANG_WARN_INFINITE_RECURSION = YES;
552567
CLANG_WARN_INT_CONVERSION = YES;
568+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
569+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
553570
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
571+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
572+
CLANG_WARN_STRICT_PROTOTYPES = YES;
554573
CLANG_WARN_SUSPICIOUS_MOVE = YES;
555574
CLANG_WARN_SUSPICIOUS_MOVES = YES;
556575
CLANG_WARN_UNREACHABLE_CODE = YES;
@@ -574,6 +593,7 @@
574593
PRODUCT_BUNDLE_PACKAGE_TYPE = BNDL;
575594
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
576595
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
596+
SWIFT_VERSION = 4.0;
577597
TARGETED_DEVICE_FAMILY = "1,2,3";
578598
TVOS_DEPLOYMENT_TARGET = 9.0;
579599
VALIDATE_PRODUCT = YES;

Diff for: AnchorKit.xcodeproj/xcshareddata/xcschemes/AnchorKit.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0830"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Diff for: AnchorKit.xcodeproj/xcshareddata/xcschemes/AnchorKitTests.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0830"
3+
LastUpgradeVersion = "0900"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)