Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Swift 5.0 and Xcode 10.3 #53

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode10.3

# xcode_project: FaveButtonDemo/FaveButtonDemo.xcodeproj
# xcode_scheme: FaveButton
Expand All @@ -14,4 +14,4 @@ script:
- xcodebuild -project FaveButtonDemo/FaveButtonDemo.xcodeproj -scheme "FaveButton" -sdk iphonesimulator11.2
-configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c

# SWIFT_VERSION: 4.0
# SWIFT_VERSION: 5.0
22 changes: 10 additions & 12 deletions FaveButtonDemo/FaveButtonDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -231,24 +231,24 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1030;
ORGANIZATIONNAME = "Jansel Valentin";
TargetAttributes = {
26FEF3241D0E158100D75731 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 9T9Q2EVV88;
LastSwiftMigration = 0900;
LastSwiftMigration = 1030;
};
26FEF33E1D0E159B00D75731 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 9T9Q2EVV88;
LastSwiftMigration = 0900;
LastSwiftMigration = 1030;
};
};
};
buildConfigurationList = 26FEF3201D0E158100D75731 /* Build configuration list for PBXProject "FaveButtonDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -353,6 +353,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -408,6 +409,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -467,8 +469,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.xhamr.DemoFaveButton;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -486,8 +487,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.xhamr.DemoFaveButton;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -509,8 +509,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -534,8 +533,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.xhamr.FaveButton;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
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 = "1000"
LastUpgradeVersion = "1030"
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 = "1000"
LastUpgradeVersion = "1030"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion FaveButtonDemo/FaveButtonDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
14 changes: 7 additions & 7 deletions Source/Ring.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ extension Ring{
#if swift(>=4.2)
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#else
$0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#endif

}
Expand All @@ -180,8 +180,8 @@ extension Ring{
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#else
$0.fillMode = kCAFillModeForwards
$0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#endif
$0.isRemovedOnCompletion = false

Expand All @@ -200,8 +200,8 @@ extension Ring{
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#else
$0.fillMode = kCAFillModeForwards
$0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#endif
}
return animation
Expand All @@ -220,8 +220,8 @@ extension Ring{
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#else
$0.fillMode = kCAFillModeForwards
$0.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseOut)
$0.fillMode = CAMediaTimingFillMode.forwards
$0.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeOut)
#endif
}
return animation
Expand Down