Skip to content

Commit 513547e

Browse files
committed
Update Swift version to 4.2
1 parent b688f59 commit 513547e

File tree

7 files changed

+25
-21
lines changed

7 files changed

+25
-21
lines changed

ChainedAnimation.xcodeproj/project.pbxproj

+11-5
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,17 @@
247247
isa = PBXProject;
248248
attributes = {
249249
LastSwiftUpdateCheck = 0800;
250-
LastUpgradeCheck = 0900;
250+
LastUpgradeCheck = 1000;
251251
ORGANIZATIONNAME = "Silvan Dähn";
252252
TargetAttributes = {
253253
AF6A02451D84204900F89BD9 = {
254254
CreatedOnToolsVersion = 8.0;
255-
LastSwiftMigration = 0900;
255+
LastSwiftMigration = 1000;
256256
ProvisioningStyle = Automatic;
257257
};
258258
AF6A024E1D84204900F89BD9 = {
259259
CreatedOnToolsVersion = 8.0;
260-
LastSwiftMigration = 0800;
260+
LastSwiftMigration = 1000;
261261
ProvisioningStyle = Automatic;
262262
};
263263
AF79A3CF1D843C0E0060857F = {
@@ -396,13 +396,15 @@
396396
CLANG_WARN_BOOL_CONVERSION = YES;
397397
CLANG_WARN_COMMA = YES;
398398
CLANG_WARN_CONSTANT_CONVERSION = YES;
399+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
399400
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
400401
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
401402
CLANG_WARN_EMPTY_BODY = YES;
402403
CLANG_WARN_ENUM_CONVERSION = YES;
403404
CLANG_WARN_INFINITE_RECURSION = YES;
404405
CLANG_WARN_INT_CONVERSION = YES;
405406
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
407+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
406408
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
407409
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
408410
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -457,13 +459,15 @@
457459
CLANG_WARN_BOOL_CONVERSION = YES;
458460
CLANG_WARN_COMMA = YES;
459461
CLANG_WARN_CONSTANT_CONVERSION = YES;
462+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
460463
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
461464
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
462465
CLANG_WARN_EMPTY_BODY = YES;
463466
CLANG_WARN_ENUM_CONVERSION = YES;
464467
CLANG_WARN_INFINITE_RECURSION = YES;
465468
CLANG_WARN_INT_CONVERSION = YES;
466469
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
470+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
467471
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
468472
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
469473
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -514,7 +518,7 @@
514518
PRODUCT_NAME = "$(TARGET_NAME)";
515519
SKIP_INSTALL = YES;
516520
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
517-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
521+
SWIFT_VERSION = 4.2;
518522
};
519523
name = Debug;
520524
};
@@ -533,7 +537,7 @@
533537
PRODUCT_BUNDLE_IDENTIFIER = com.silvandaehn.ChainedAnimation;
534538
PRODUCT_NAME = "$(TARGET_NAME)";
535539
SKIP_INSTALL = YES;
536-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
540+
SWIFT_VERSION = 4.2;
537541
};
538542
name = Release;
539543
};
@@ -545,6 +549,7 @@
545549
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
546550
PRODUCT_BUNDLE_IDENTIFIER = com.silvandaehn.ChainedAnimationTests;
547551
PRODUCT_NAME = "$(TARGET_NAME)";
552+
SWIFT_VERSION = 4.2;
548553
};
549554
name = Debug;
550555
};
@@ -556,6 +561,7 @@
556561
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
557562
PRODUCT_BUNDLE_IDENTIFIER = com.silvandaehn.ChainedAnimationTests;
558563
PRODUCT_NAME = "$(TARGET_NAME)";
564+
SWIFT_VERSION = 4.2;
559565
};
560566
name = Release;
561567
};

ChainedAnimation.xcodeproj/xcshareddata/xcschemes/ChainedAnimation.xcscheme

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1000"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,9 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
30-
shouldUseLaunchSchemeArgsEnv = "YES"
31-
codeCoverageEnabled = "YES">
29+
codeCoverageEnabled = "YES"
30+
shouldUseLaunchSchemeArgsEnv = "YES">
3231
<Testables>
3332
<TestableReference
3433
skipped = "NO">
@@ -57,7 +56,6 @@
5756
buildConfiguration = "Debug"
5857
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5958
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
60-
language = ""
6159
launchStyle = "0"
6260
useCustomWorkingDirectory = "NO"
6361
ignoresPersistentStateOnLaunch = "NO"

ChainedAnimation/AnimationChain.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
public struct AnimationChain {
1010

11-
let options: UIViewAnimationOptions
11+
let options: UIView.AnimationOptions
1212
var animations: [[AnimationConfiguration]]
1313
var currentOffset: TimeInterval
1414

15-
init(options: UIViewAnimationOptions, animations: [[AnimationConfiguration]], currentOffset : TimeInterval = 0) {
15+
init(options: UIView.AnimationOptions, animations: [[AnimationConfiguration]], currentOffset : TimeInterval = 0) {
1616
self.options = options
1717
self.animations = animations
1818
self.currentOffset = currentOffset
@@ -84,7 +84,7 @@ public struct AnimationChain {
8484
public func chainAfterCompletion(
8585
_ duration: TimeInterval,
8686
delay: TimeInterval = 0,
87-
options: UIViewAnimationOptions = [],
87+
options: UIView.AnimationOptions = [],
8888
animations newAnimations: @escaping Animation
8989
) -> AnimationChain {
9090

@@ -145,7 +145,7 @@ extension UIView {
145145
public class func beginAnimationChain(
146146
_ duration: TimeInterval,
147147
delay: TimeInterval = 0,
148-
options: UIViewAnimationOptions = [],
148+
options: UIView.AnimationOptions = [],
149149
animations: @escaping Animation
150150
) -> AnimationChain {
151151

ChainedAnimation/AnimationConfiguration.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ struct AnimationConfiguration {
1212
let animation: Animation
1313
let duration: TimeInterval
1414
let delay: TimeInterval
15-
let options: UIViewAnimationOptions
15+
let options: UIView.AnimationOptions
1616
var completion : Completion?
1717

18-
init(_ animation: @escaping Animation, duration: TimeInterval, delay: TimeInterval, options: UIViewAnimationOptions = [], completion: Completion? = nil) {
18+
init(_ animation: @escaping Animation, duration: TimeInterval, delay: TimeInterval, options: UIView.AnimationOptions = [], completion: Completion? = nil) {
1919
self.animation = animation
2020
self.duration = duration
2121
self.delay = delay

ChainedAnimation/AnimationProvider.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
public protocol AnimationProvider {
1111

12-
func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIViewAnimationOptions, animations: @escaping Animation, completion: Completion?)
12+
func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIView.AnimationOptions, animations: @escaping Animation, completion: Completion?)
1313

1414
}
1515

1616

1717
struct UIViewAnimationProvider: AnimationProvider {
1818

19-
func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIViewAnimationOptions, animations: @escaping Animation, completion: Completion?) {
19+
func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIView.AnimationOptions, animations: @escaping Animation, completion: Completion?) {
2020
UIView.animate(
2121
withDuration: duration,
2222
delay: delay,

ChainedAnimationTests/ChainedAnimationTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ChainedAnimationTests: ChainedAnimationTestCase {
3838
}
3939

4040
func testCompletionCalled() {
41-
UIView.beginAnimationChain(2, delay: 0, options: UIViewAnimationOptions.curveEaseInOut) {
41+
UIView.beginAnimationChain(2, delay: 0, options: UIView.AnimationOptions.curveEaseInOut) {
4242
}.completion { success in
4343
XCTAssert(success)
4444
}.animate()

ChainedAnimationTests/MockAnimationProvider.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ChainedAnimation
1212
typealias AnimationParameters = (
1313
duration: TimeInterval,
1414
delay: TimeInterval,
15-
options: UIViewAnimationOptions,
15+
options: UIView.AnimationOptions,
1616
animations: Animation,
1717
completion: Completion?
1818
)
@@ -47,7 +47,7 @@ class MockAnimationProvider: AnimationProvider {
4747

4848
var callPassedInClosures = false
4949

50-
public func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIViewAnimationOptions, animations: @escaping Animation, completion: Completion?) {
50+
public func animate(withDuration duration: TimeInterval, delay: TimeInterval, options: UIView.AnimationOptions, animations: @escaping Animation, completion: Completion?) {
5151
callCount += 1
5252
let parameters = (duration: duration, delay: delay, options: options, animations: animations, completion: completion)
5353
callParameters = parameters

0 commit comments

Comments
 (0)