Skip to content

Commit

Permalink
Merge pull request #45 from sean-howard/swift-4.2
Browse files Browse the repository at this point in the history
Swift 4.2 migration and pod spec updates
  • Loading branch information
shu223 authored Sep 25, 2018
2 parents a386829 + d7a6c6b commit d8e207a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

4 changes: 2 additions & 2 deletions Example/PulsatorDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "Shuichi-Tsutsumi.Pulsator";
PRODUCT_NAME = PulsatorDemo;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -311,7 +311,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "Shuichi-Tsutsumi.Pulsator";
PRODUCT_NAME = PulsatorDemo;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Example/PulsatorDemo/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]? = nil) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
5 changes: 3 additions & 2 deletions Pulsator.podspec
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Pod::Spec.new do |s|
s.name = "Pulsator"
s.version = "0.5.1"
s.version = "0.5.3"
s.summary = "Pulse animation for iOS."
s.homepage = "https://github.com/shu223/Pulsator"
s.screenshots = "https://github.com/shu223/Pulsator/blob/master/demo.gif?raw=true"
s.license = 'MIT'
s.author = { "shu223" => "[email protected]" }
s.source = { :git => "https://github.com/shu223/Pulsator.git", :tag => "0.5.1" }
s.source = { :git => "https://github.com/shu223/Pulsator.git", :tag => "#{s.version}" }
s.social_media_url = 'https://twitter.com/shu223'
s.swift_version = '4.2'

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.9'
Expand Down
12 changes: 6 additions & 6 deletions Pulsator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand Down Expand Up @@ -369,7 +369,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down Expand Up @@ -511,7 +511,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
"VALID_ARCHS[sdk=iphoneos*]" = "arm64 armv7 armv7s";
"VALID_ARCHS[sdk=iphonesimulator*]" = "i386 x86_64";
};
Expand Down Expand Up @@ -539,7 +539,7 @@
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
"VALID_ARCHS[sdk=iphoneos*]" = "arm64 armv7 armv7s";
"VALID_ARCHS[sdk=iphonesimulator*]" = "i386 x86_64";
};
Expand All @@ -553,7 +553,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "Shuichi-Tsutsumi.PulsatorTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -565,7 +565,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "Shuichi-Tsutsumi.PulsatorTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
6 changes: 3 additions & 3 deletions Pulsator/Pulsator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import UIKit
public typealias Color = UIColor

internal let screenScale = UIScreen.main.scale
internal let applicationWillBecomeActiveNotfication = NSNotification.Name.UIApplicationWillEnterForeground
internal let applicationDidResignActiveNotification = NSNotification.Name.UIApplicationDidEnterBackground
internal let applicationWillBecomeActiveNotfication = UIApplication.willEnterForegroundNotification
internal let applicationDidResignActiveNotification = UIApplication.didEnterBackgroundNotification
#elseif os(macOS)
import Cocoa
public typealias Color = NSColor
Expand Down Expand Up @@ -105,7 +105,7 @@ open class Pulsator: CAReplicatorLayer, CAAnimationDelegate {
@objc open var pulseInterval: TimeInterval = 0

/// A function describing a timing curve of the animation.
@objc open var timingFunction: CAMediaTimingFunction? = CAMediaTimingFunction(name: kCAMediaTimingFunctionDefault) {
@objc open var timingFunction: CAMediaTimingFunction? = CAMediaTimingFunction(name: .default) {
didSet {
if let animationGroup = animationGroup {
animationGroup.timingFunction = timingFunction
Expand Down

0 comments on commit d8e207a

Please sign in to comment.