Skip to content

Commit

Permalink
Merge pull request #16 from keithito/swift4
Browse files Browse the repository at this point in the history
Migrate project to Swift 4
  • Loading branch information
keithito authored Dec 22, 2017
2 parents 7e0bac3 + dad4b04 commit d6fc10e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
# * https://github.com/supermarin/xcpretty#usage

language: objective-c
osx_image: xcode8
osx_image: xcode9
before_install:
- gem install cocoapods xcpretty --no-rdoc --no-ri --no-document --quiet
script:
- set -o pipefail && xcodebuild test -workspace SimpleAnimation.xcworkspace -scheme SimpleAnimation -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=10.0' ONLY_ACTIVE_ARCH=NO | xcpretty
- set -o pipefail && xcodebuild test -workspace SimpleAnimation.xcworkspace -scheme SimpleAnimation -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=11.0' ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint --quick
10 changes: 5 additions & 5 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
400523801CC973C600E6DDA3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4005237F1CC973C600E6DDA3 /* Assets.xcassets */; };
400523871CC973E100E6DDA3 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 400523831CC973E100E6DDA3 /* LaunchScreen.xib */; };
400523881CC973E100E6DDA3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 400523851CC973E100E6DDA3 /* Main.storyboard */; };
4005238A1CC973F200E6DDA3 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 400523891CC973F200E6DDA3 /* Info.plist */; };
407C88111F4B2AD60077A2BC /* UIView+SimpleAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 407C88101F4B2AD60077A2BC /* UIView+SimpleAnimation.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -100,7 +99,7 @@
TargetAttributes = {
400523501CC7B94C00E6DDA3 = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 0920;
};
};
};
Expand All @@ -127,7 +126,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4005238A1CC973F200E6DDA3 /* Info.plist in Resources */,
400523881CC973E100E6DDA3 /* Main.storyboard in Resources */,
400523871CC973E100E6DDA3 /* LaunchScreen.xib in Resources */,
400523801CC973C600E6DDA3 /* Assets.xcassets in Resources */,
Expand Down Expand Up @@ -265,7 +263,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.keithito.SimpleAnimationExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -279,7 +278,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.keithito.SimpleAnimationExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ view.shake(toward: .top, amount: 0.5, duration: 2, delay: 0.5)
```
<img src="screenshots/customShake.gif" width="240" height="212">

SimpleAnimation is written in Swift 3, but older versions can be used with Swift 2.


## Installation

Expand Down
14 changes: 13 additions & 1 deletion SimpleAnimation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "Keith Ito";
TargetAttributes = {
400523231CC7B47800E6DDA3 = {
Expand Down Expand Up @@ -233,14 +233,20 @@
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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -285,14 +291,20 @@
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_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_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = 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 = "0800"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand Down Expand Up @@ -55,6 +56,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down

0 comments on commit d6fc10e

Please sign in to comment.