Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 43faadd

Browse files
author
featherless
authored
Upgrade to Swift 5 and min OS of iOS 10. (#130)
1 parent dfab38b commit 43faadd

File tree

15 files changed

+129
-127
lines changed

15 files changed

+129
-127
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0
1+
5

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ env:
77
- LANGUAGE=en_US.UTF-8
88
matrix:
99
include:
10-
- osx_image: xcode9.2
11-
env: COVERAGE=code_coverage SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=11.2"
12-
- osx_image: xcode9.2
13-
env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=10.3.1"
14-
- osx_image: xcode9.2
15-
env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=9.3"
10+
- osx_image: xcode12.2
11+
env: COVERAGE=code_coverage SDK="iphonesimulator14.2" DESTINATION="name=iPhone 6s,OS=11.4"
12+
- osx_image: xcode12.2
13+
env: SDK="iphonesimulator14.2" DESTINATION="name=iPhone 6s,OS=10.3.1"
1614
before_install:
17-
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
15+
- gem install cocoapods --no-document --quiet
1816
- pod install --repo-update
1917
script:
2018
- set -o pipefail

MotionAnimator.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Pod::Spec.new do |s|
66
s.license = "Apache 2.0"
77
s.homepage = "https://github.com/material-motion/motion-animator-objc"
88
s.source = { :git => "https://github.com/material-motion/motion-animator-objc.git", :tag => "v" + s.version.to_s }
9-
s.platform = :ios, "9.0"
9+
s.platform = :ios, "10.0"
1010
s.requires_arc = true
1111

1212
s.public_header_files = "src/*.h"

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ EXTERNAL SOURCES:
1919

2020
SPEC CHECKSUMS:
2121
CatalogByConvention: 2b58a9b64e5b1049abb5d3f8e764a551bbe843a7
22-
MotionAnimator: 5f99d7c9592928c0f28a66283eda9c3b657dc480
22+
MotionAnimator: 0ca495182cae31240fd6fd42de861b312c022987
2323
MotionInterchange: 13adae439b377e31d1674cc165539d50e1d1566a
2424

2525
PODFILE CHECKSUM: 3537bf01c11174928ac008c20fec4738722e96f3

examples/TapToBounceTraitsExample.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class TapToBounceTraitsExampleViewController: UIViewController {
5151
tension: 100,
5252
friction: 10))
5353

54-
func didFocus(_ sender: UIButton) {
54+
@objc func didFocus(_ sender: UIButton) {
5555
let animator = MotionAnimator()
5656
animator.animate(with: traits) {
5757
sender.transform = CGAffineTransform(scaleX: 1.5, y: 1.5)
@@ -62,7 +62,7 @@ class TapToBounceTraitsExampleViewController: UIViewController {
6262
}
6363
}
6464

65-
func didUnfocus(_ sender: UIButton) {
65+
@objc func didUnfocus(_ sender: UIButton) {
6666
let animator = MotionAnimator()
6767
animator.animate(with: traits) {
6868
sender.transform = .identity

examples/TapToBounceUIKitExample.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TapToBounceUIKitExampleViewController: UIViewController {
4646
for: [.touchUpInside, .touchUpOutside, .touchDragExit])
4747
}
4848

49-
func didFocus(_ sender: UIButton) {
49+
@objc func didFocus(_ sender: UIButton) {
5050
MotionAnimator.animate(withDuration: 0.8,
5151
delay: 0,
5252
usingSpringWithDamping: 0.5,
@@ -61,7 +61,7 @@ class TapToBounceUIKitExampleViewController: UIViewController {
6161
}, completion: nil)
6262
}
6363

64-
func didUnfocus(_ sender: UIButton) {
64+
@objc func didUnfocus(_ sender: UIButton) {
6565
MotionAnimator.animate(withDuration: 0.8,
6666
delay: 0,
6767
usingSpringWithDamping: 0.5,

examples/apps/Catalog/Catalog/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2222

2323
var window: UIWindow?
2424

25-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
25+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
2626
let window = UIWindow(frame: UIScreen.main.bounds)
2727
self.window = window
2828

examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/project.pbxproj

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
isa = PBXProject;
336336
attributes = {
337337
LastSwiftUpdateCheck = 0810;
338-
LastUpgradeCheck = 0800;
338+
LastUpgradeCheck = 1240;
339339
ORGANIZATIONNAME = Google;
340340
TargetAttributes = {
341341
666FAA7F1D384A6B000363DA = {
@@ -358,6 +358,7 @@
358358
developmentRegion = English;
359359
hasScannedForEncodings = 0;
360360
knownRegions = (
361+
English,
361362
en,
362363
Base,
363364
);
@@ -567,18 +568,30 @@
567568
isa = XCBuildConfiguration;
568569
buildSettings = {
569570
ALWAYS_SEARCH_USER_PATHS = NO;
571+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
570572
CLANG_ANALYZER_NONNULL = YES;
571573
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
572574
CLANG_CXX_LIBRARY = "libc++";
573575
CLANG_ENABLE_MODULES = YES;
574576
CLANG_ENABLE_OBJC_ARC = YES;
577+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
575578
CLANG_WARN_BOOL_CONVERSION = YES;
579+
CLANG_WARN_COMMA = YES;
576580
CLANG_WARN_CONSTANT_CONVERSION = YES;
581+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
577582
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
578583
CLANG_WARN_EMPTY_BODY = YES;
579584
CLANG_WARN_ENUM_CONVERSION = YES;
585+
CLANG_WARN_INFINITE_RECURSION = YES;
580586
CLANG_WARN_INT_CONVERSION = YES;
587+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
588+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
589+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
581590
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
591+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
592+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
593+
CLANG_WARN_STRICT_PROTOTYPES = YES;
594+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
582595
CLANG_WARN_UNREACHABLE_CODE = YES;
583596
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
584597
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -600,11 +613,12 @@
600613
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
601614
GCC_WARN_UNUSED_FUNCTION = YES;
602615
GCC_WARN_UNUSED_VARIABLE = YES;
603-
IPHONEOS_DEPLOYMENT_TARGET = 9;
616+
IPHONEOS_DEPLOYMENT_TARGET = 10;
604617
MTL_ENABLE_DEBUG_INFO = YES;
605618
ONLY_ACTIVE_ARCH = YES;
606619
SDKROOT = iphoneos;
607620
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
621+
SWIFT_VERSION = 5.0;
608622
TARGETED_DEVICE_FAMILY = "1,2";
609623
};
610624
name = Debug;
@@ -613,18 +627,30 @@
613627
isa = XCBuildConfiguration;
614628
buildSettings = {
615629
ALWAYS_SEARCH_USER_PATHS = NO;
630+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
616631
CLANG_ANALYZER_NONNULL = YES;
617632
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
618633
CLANG_CXX_LIBRARY = "libc++";
619634
CLANG_ENABLE_MODULES = YES;
620635
CLANG_ENABLE_OBJC_ARC = YES;
636+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
621637
CLANG_WARN_BOOL_CONVERSION = YES;
638+
CLANG_WARN_COMMA = YES;
622639
CLANG_WARN_CONSTANT_CONVERSION = YES;
640+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
623641
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
624642
CLANG_WARN_EMPTY_BODY = YES;
625643
CLANG_WARN_ENUM_CONVERSION = YES;
644+
CLANG_WARN_INFINITE_RECURSION = YES;
626645
CLANG_WARN_INT_CONVERSION = YES;
646+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
647+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
648+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
627649
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
650+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
651+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
652+
CLANG_WARN_STRICT_PROTOTYPES = YES;
653+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
628654
CLANG_WARN_UNREACHABLE_CODE = YES;
629655
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
630656
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -640,9 +666,10 @@
640666
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
641667
GCC_WARN_UNUSED_FUNCTION = YES;
642668
GCC_WARN_UNUSED_VARIABLE = YES;
643-
IPHONEOS_DEPLOYMENT_TARGET = 9;
669+
IPHONEOS_DEPLOYMENT_TARGET = 10;
644670
MTL_ENABLE_DEBUG_INFO = NO;
645671
SDKROOT = iphoneos;
672+
SWIFT_VERSION = 5.0;
646673
TARGETED_DEVICE_FAMILY = "1,2";
647674
VALIDATE_PRODUCT = YES;
648675
};
@@ -659,7 +686,6 @@
659686
PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog;
660687
PRODUCT_NAME = "$(TARGET_NAME)";
661688
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
662-
SWIFT_VERSION = 3.0;
663689
};
664690
name = Debug;
665691
};
@@ -674,7 +700,6 @@
674700
PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog;
675701
PRODUCT_NAME = "$(TARGET_NAME)";
676702
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
677-
SWIFT_VERSION = 3.0;
678703
};
679704
name = Release;
680705
};
@@ -690,7 +715,6 @@
690715
PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests;
691716
PRODUCT_NAME = "$(TARGET_NAME)";
692717
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
693-
SWIFT_VERSION = 3.0;
694718
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness";
695719
};
696720
name = Debug;
@@ -707,7 +731,6 @@
707731
PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests;
708732
PRODUCT_NAME = "$(TARGET_NAME)";
709733
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
710-
SWIFT_VERSION = 3.0;
711734
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness";
712735
};
713736
name = Release;
@@ -724,7 +747,6 @@
724747
PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness;
725748
PRODUCT_NAME = "$(TARGET_NAME)";
726749
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
727-
SWIFT_VERSION = 3.0;
728750
};
729751
name = Debug;
730752
};
@@ -740,7 +762,6 @@
740762
PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness;
741763
PRODUCT_NAME = "$(TARGET_NAME)";
742764
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
743-
SWIFT_VERSION = 3.0;
744765
};
745766
name = Release;
746767
};

examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/MotionAnimatorCatalog.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1240"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "666FAA7F1D384A6B000363DA"
34+
BuildableName = "MotionAnimatorCatalog.app"
35+
BlueprintName = "MotionAnimatorCatalog"
36+
ReferencedContainer = "container:MotionAnimatorCatalog.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -39,17 +48,6 @@
3948
</BuildableReference>
4049
</TestableReference>
4150
</Testables>
42-
<MacroExpansion>
43-
<BuildableReference
44-
BuildableIdentifier = "primary"
45-
BlueprintIdentifier = "666FAA7F1D384A6B000363DA"
46-
BuildableName = "MotionAnimatorCatalog.app"
47-
BlueprintName = "MotionAnimatorCatalog"
48-
ReferencedContainer = "container:MotionAnimatorCatalog.xcodeproj">
49-
</BuildableReference>
50-
</MacroExpansion>
51-
<AdditionalOptions>
52-
</AdditionalOptions>
5351
</TestAction>
5452
<LaunchAction
5553
buildConfiguration = "Debug"
@@ -71,8 +69,6 @@
7169
ReferencedContainer = "container:MotionAnimatorCatalog.xcodeproj">
7270
</BuildableReference>
7371
</BuildableProductRunnable>
74-
<AdditionalOptions>
75-
</AdditionalOptions>
7672
</LaunchAction>
7773
<ProfileAction
7874
buildConfiguration = "Release"

examples/apps/Catalog/MotionAnimatorCatalog.xcodeproj/xcshareddata/xcschemes/UnitTests.xcscheme

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1240"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -23,8 +23,6 @@
2323
</BuildableReference>
2424
</TestableReference>
2525
</Testables>
26-
<AdditionalOptions>
27-
</AdditionalOptions>
2826
</TestAction>
2927
<LaunchAction
3028
buildConfiguration = "Debug"
@@ -36,8 +34,6 @@
3634
debugDocumentVersioning = "YES"
3735
debugServiceExtension = "internal"
3836
allowLocationSimulation = "YES">
39-
<AdditionalOptions>
40-
</AdditionalOptions>
4137
</LaunchAction>
4238
<ProfileAction
4339
buildConfiguration = "Release"

0 commit comments

Comments
 (0)