From f78387887d7481994562fd20839b2b9db7f2bbc1 Mon Sep 17 00:00:00 2001 From: liudong Date: Sat, 8 Jul 2017 20:15:17 +0800 Subject: [PATCH 01/11] Add CocoaPods support, and release version 1.01 --- Sources/Info-iOS.plist | 2 +- Sources/Info-macOS.plist | 2 +- Sources/Info-tvOS.plist | 2 +- Sources/Info-watchOS.plist | 2 +- SwiftTimer.podspec | 15 ++++ SwiftTimer.xcodeproj/project.pbxproj | 5 ++ .../xcschemes/SwiftTimer iOS.xcscheme | 2 + .../xcschemes/SwiftTimer macOS.xcscheme | 82 +++++++++++++++++++ .../contents.xcworkspacedata | 7 -- 9 files changed, 108 insertions(+), 11 deletions(-) create mode 100644 SwiftTimer.podspec create mode 100644 SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme delete mode 100644 SwiftTimer.xcworkspace/contents.xcworkspacedata diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index fbe1e6b..f9a8194 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-macOS.plist b/Sources/Info-macOS.plist index fbe1e6b..f9a8194 100644 --- a/Sources/Info-macOS.plist +++ b/Sources/Info-macOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index fbe1e6b..f9a8194 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-watchOS.plist b/Sources/Info-watchOS.plist index fbe1e6b..f9a8194 100644 --- a/Sources/Info-watchOS.plist +++ b/Sources/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/SwiftTimer.podspec b/SwiftTimer.podspec new file mode 100644 index 0000000..0375b6f --- /dev/null +++ b/SwiftTimer.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + + s.name = "SwiftTimer" + s.version = "1.0.1" + s.summary = "Simple and Elegant Timer" + s.homepage = "https://github.com/anotheren/SwiftTimer" + s.license = { :type => "MIT" } + s.author = { "liudong" => "liudong.edward@qq.com" } + s.requires_arc = true + s.ios.deployment_target = "8.0" + s.source = { :git => "https://github.com/anotheren/SwiftTimer.git", + :tag => s.version } + s.source_files = "Source/*.swift" + +end diff --git a/SwiftTimer.xcodeproj/project.pbxproj b/SwiftTimer.xcodeproj/project.pbxproj index 3ad0c3e..458f81e 100644 --- a/SwiftTimer.xcodeproj/project.pbxproj +++ b/SwiftTimer.xcodeproj/project.pbxproj @@ -1024,6 +1024,7 @@ BF84D1711D6C016500B5B511 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; BF84D17C1D6C01A600B5B511 /* Build configuration list for PBXNativeTarget "SwiftTimer watchOS" */ = { isa = XCConfigurationList; @@ -1032,6 +1033,7 @@ BF84D17E1D6C01A600B5B511 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; BF84D1891D6C01C000B5B511 /* Build configuration list for PBXNativeTarget "SwiftTimer tvOS" */ = { isa = XCConfigurationList; @@ -1040,6 +1042,7 @@ BF84D18B1D6C01C000B5B511 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; BF84D1961D6C01DD00B5B511 /* Build configuration list for PBXNativeTarget "SwiftTimer macOS" */ = { isa = XCConfigurationList; @@ -1048,6 +1051,7 @@ BF84D1981D6C01DD00B5B511 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; BF84D1C51D6C0F1600B5B511 /* Build configuration list for PBXNativeTarget "SwiftTimer iOSTests" */ = { isa = XCConfigurationList; @@ -1056,6 +1060,7 @@ BF84D1C71D6C0F1600B5B511 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme index e79f6fa..c3dcc07 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme new file mode 100644 index 0000000..ab0a207 --- /dev/null +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SwiftTimer.xcworkspace/contents.xcworkspacedata b/SwiftTimer.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c604831..0000000 --- a/SwiftTimer.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - From 08fb4d9b313e6e155c0b349c75525b9a0b2538ac Mon Sep 17 00:00:00 2001 From: liudong Date: Sat, 8 Jul 2017 20:26:40 +0800 Subject: [PATCH 02/11] Add Licence and fix error --- LICENSE | 21 +++++++++++++++++++++ SwiftTimer.podspec | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..532bc01 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 刘栋 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/SwiftTimer.podspec b/SwiftTimer.podspec index 0375b6f..fa7d4fb 100644 --- a/SwiftTimer.podspec +++ b/SwiftTimer.podspec @@ -10,6 +10,6 @@ Pod::Spec.new do |s| s.ios.deployment_target = "8.0" s.source = { :git => "https://github.com/anotheren/SwiftTimer.git", :tag => s.version } - s.source_files = "Source/*.swift" + s.source_files = "Sources/*.swift" end From b6d77872968eff9a2a2095b75ca3b91a1c9270c3 Mon Sep 17 00:00:00 2001 From: liudong Date: Sun, 9 Jul 2017 12:02:40 +0800 Subject: [PATCH 03/11] Add allow APPLICATION_EXTENSION_API_ONLY = YES to fix Apple Mach-O Linker Warning --- SwiftTimer.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SwiftTimer.xcodeproj/project.pbxproj b/SwiftTimer.xcodeproj/project.pbxproj index 458f81e..3a60127 100644 --- a/SwiftTimer.xcodeproj/project.pbxproj +++ b/SwiftTimer.xcodeproj/project.pbxproj @@ -417,6 +417,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -482,6 +483,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -663,6 +665,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -727,6 +730,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -784,6 +788,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -849,6 +854,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; From e89404dfa6822f2212227a0edb4c72457edea160 Mon Sep 17 00:00:00 2001 From: liudong Date: Sun, 9 Jul 2017 12:07:20 +0800 Subject: [PATCH 04/11] release version 1.0.2 --- Sources/Info-iOS.plist | 2 +- Sources/Info-macOS.plist | 2 +- Sources/Info-tvOS.plist | 2 +- Sources/Info-watchOS.plist | 2 +- SwiftTimer.podspec | 5 ++++- SwiftTimer.xcodeproj/project.pbxproj | 2 ++ 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index f9a8194..175b2b5 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.1 + 1.0.2 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-macOS.plist b/Sources/Info-macOS.plist index f9a8194..175b2b5 100644 --- a/Sources/Info-macOS.plist +++ b/Sources/Info-macOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.1 + 1.0.2 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index f9a8194..175b2b5 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.1 + 1.0.2 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-watchOS.plist b/Sources/Info-watchOS.plist index f9a8194..175b2b5 100644 --- a/Sources/Info-watchOS.plist +++ b/Sources/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.1 + 1.0.2 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/SwiftTimer.podspec b/SwiftTimer.podspec index fa7d4fb..4a2d5fe 100644 --- a/SwiftTimer.podspec +++ b/SwiftTimer.podspec @@ -1,13 +1,16 @@ Pod::Spec.new do |s| s.name = "SwiftTimer" - s.version = "1.0.1" + s.version = "1.0.2" s.summary = "Simple and Elegant Timer" s.homepage = "https://github.com/anotheren/SwiftTimer" s.license = { :type => "MIT" } s.author = { "liudong" => "liudong.edward@qq.com" } s.requires_arc = true s.ios.deployment_target = "8.0" + s.osx.deployment_target = "10.11" + s.watchos.deployment_target = "3.0" + s.tvos.deployment_target = "10.0" s.source = { :git => "https://github.com/anotheren/SwiftTimer.git", :tag => s.version } s.source_files = "Sources/*.swift" diff --git a/SwiftTimer.xcodeproj/project.pbxproj b/SwiftTimer.xcodeproj/project.pbxproj index 3a60127..23616d2 100644 --- a/SwiftTimer.xcodeproj/project.pbxproj +++ b/SwiftTimer.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + A0B1A44B1F11E2B700677CDB /* SwiftTimer.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = SwiftTimer.podspec; sourceTree = ""; }; BF84D1691D6C016500B5B511 /* SwiftTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BF84D16C1D6C016500B5B511 /* SwiftTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SwiftTimer.h; path = Sources/SwiftTimer.h; sourceTree = ""; }; BF84D1771D6C01A600B5B511 /* SwiftTimer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftTimer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -89,6 +90,7 @@ BF84D15D1D6C010700B5B511 = { isa = PBXGroup; children = ( + A0B1A44B1F11E2B700677CDB /* SwiftTimer.podspec */, BF84D1AF1D6C033000B5B511 /* Sources */, BF84D1BE1D6C0F1600B5B511 /* SwiftTimer iOSTests */, BF84D16A1D6C016500B5B511 /* Products */, From 7a7299a570686211a0935293577365203d0a5dfa Mon Sep 17 00:00:00 2001 From: liudong Date: Sun, 9 Jul 2017 13:13:13 +0800 Subject: [PATCH 05/11] update SwiftTimer.h to fix Carthage build error and update Project recommend setting --- Sources/SwiftTimer.h | 2 +- SwiftTimer.xcodeproj/project.pbxproj | 42 +++++++++++++++++-- .../xcschemes/SwiftTimer iOS.xcscheme | 5 +-- .../xcschemes/SwiftTimer macOS.xcscheme | 5 +-- .../xcschemes/SwiftTimer tvOS.xcscheme | 2 +- .../xcschemes/SwiftTimer watchOS.xcscheme | 2 +- 6 files changed, 46 insertions(+), 12 deletions(-) diff --git a/Sources/SwiftTimer.h b/Sources/SwiftTimer.h index dc270d2..2bfd737 100644 --- a/Sources/SwiftTimer.h +++ b/Sources/SwiftTimer.h @@ -6,7 +6,7 @@ // // -#import +#import //! Project version number for SwiftTimer. FOUNDATION_EXPORT double SwiftTimer_VersionNumber; diff --git a/SwiftTimer.xcodeproj/project.pbxproj b/SwiftTimer.xcodeproj/project.pbxproj index 23616d2..bf84ddd 100644 --- a/SwiftTimer.xcodeproj/project.pbxproj +++ b/SwiftTimer.xcodeproj/project.pbxproj @@ -266,7 +266,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0830; TargetAttributes = { BF84D1681D6C016500B5B511 = { CreatedOnToolsVersion = 8.0; @@ -406,12 +406,48 @@ BF84D1621D6C010700B5B511 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; }; name = Debug; }; BF84D1631D6C010700B5B511 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; }; name = Release; }; @@ -438,7 +474,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; @@ -504,7 +540,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme index c3dcc07..48b2f59 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0830" + version = "1.8"> @@ -37,7 +37,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme index ab0a207..77b0822 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0830" + version = "1.8"> @@ -37,7 +37,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme index e01fe57..f7646db 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme @@ -1,6 +1,6 @@ Date: Sun, 9 Jul 2017 13:15:16 +0800 Subject: [PATCH 06/11] release version 1.0.3 --- Sources/Info-iOS.plist | 2 +- Sources/Info-macOS.plist | 2 +- Sources/Info-tvOS.plist | 2 +- Sources/Info-watchOS.plist | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index 175b2b5..c3bbb00 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-macOS.plist b/Sources/Info-macOS.plist index 175b2b5..c3bbb00 100644 --- a/Sources/Info-macOS.plist +++ b/Sources/Info-macOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index 175b2b5..c3bbb00 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-watchOS.plist b/Sources/Info-watchOS.plist index 175b2b5..c3bbb00 100644 --- a/Sources/Info-watchOS.plist +++ b/Sources/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.2 + 1.0.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass From 77168474271f135e50933244f1dd831930392d0d Mon Sep 17 00:00:00 2001 From: liudong Date: Sun, 9 Jul 2017 13:17:10 +0800 Subject: [PATCH 07/11] Update podspec to version 1.0.3 --- SwiftTimer.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftTimer.podspec b/SwiftTimer.podspec index 4a2d5fe..6e8ce1e 100644 --- a/SwiftTimer.podspec +++ b/SwiftTimer.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SwiftTimer" - s.version = "1.0.2" + s.version = "1.0.3" s.summary = "Simple and Elegant Timer" s.homepage = "https://github.com/anotheren/SwiftTimer" s.license = { :type => "MIT" } From 7a73a9f473556731ebb8ddfc03afe8d01ffca166 Mon Sep 17 00:00:00 2001 From: liudong Date: Sun, 9 Jul 2017 13:24:33 +0800 Subject: [PATCH 08/11] Update readme --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ab4bae2..6be098d 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,12 @@ timer.start() ## Installation +CococaPods: + +``` +pod 'SwiftTimer', '~> 1.0.3' +``` + Carthage: ~~~ From 8294acf72271e3a9a9f1c0aa22090f4d70f2ba31 Mon Sep 17 00:00:00 2001 From: liudong Date: Mon, 6 Nov 2017 18:34:34 +0800 Subject: [PATCH 09/11] Migration to Swift 4 --- Sources/Info-iOS.plist | 2 +- Sources/Info-macOS.plist | 2 +- Sources/Info-tvOS.plist | 2 +- Sources/Info-watchOS.plist | 2 +- Sources/SwiftTimer.swift | 8 +++---- SwiftTimer.podspec | 2 +- SwiftTimer.xcodeproj/project.pbxproj | 23 ++++++++++++++++--- .../xcshareddata/WorkspaceSettings.xcsettings | 8 +++++++ .../xcschemes/SwiftTimer iOS.xcscheme | 5 ++-- .../xcschemes/SwiftTimer macOS.xcscheme | 5 ++-- .../xcschemes/SwiftTimer tvOS.xcscheme | 4 +++- .../xcschemes/SwiftTimer watchOS.xcscheme | 4 +++- 12 files changed, 49 insertions(+), 18 deletions(-) create mode 100644 SwiftTimer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index c3bbb00..0ae39de 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.3 + 2.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-macOS.plist b/Sources/Info-macOS.plist index c3bbb00..0ae39de 100644 --- a/Sources/Info-macOS.plist +++ b/Sources/Info-macOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.3 + 2.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index c3bbb00..0ae39de 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.3 + 2.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Info-watchOS.plist b/Sources/Info-watchOS.plist index c3bbb00..0ae39de 100644 --- a/Sources/Info-watchOS.plist +++ b/Sources/Info-watchOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.3 + 2.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/SwiftTimer.swift b/Sources/SwiftTimer.swift index 8aff5ef..c51b66e 100644 --- a/Sources/SwiftTimer.swift +++ b/Sources/SwiftTimer.swift @@ -32,9 +32,9 @@ public class SwiftTimer { } if repeats { - internalTimer.scheduleRepeating(deadline: .now() + interval, interval: interval) + internalTimer.schedule(deadline: .now() + interval, repeating: interval) } else { - internalTimer.scheduleOneshot(deadline: .now() + interval) + internalTimer.schedule(deadline: .now() + interval) } } @@ -74,7 +74,7 @@ public class SwiftTimer { public func rescheduleRepeating(interval: DispatchTimeInterval) { if repeats { - internalTimer.scheduleRepeating(deadline: .now() + interval, interval: interval) + internalTimer.schedule(deadline: .now() + interval, repeating: interval) } } @@ -103,7 +103,7 @@ public extension SwiftTimer { let timer = DispatchSource.makeTimerSource(queue: queue) timers[identifier] = timer - timer.scheduleOneshot(deadline: .now() + interval) + timer.schedule(deadline: .now() + interval) timer.setEventHandler { handler() timer.cancel() diff --git a/SwiftTimer.podspec b/SwiftTimer.podspec index 6e8ce1e..66c96c8 100644 --- a/SwiftTimer.podspec +++ b/SwiftTimer.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SwiftTimer" - s.version = "1.0.3" + s.version = "2.0" s.summary = "Simple and Elegant Timer" s.homepage = "https://github.com/anotheren/SwiftTimer" s.license = { :type => "MIT" } diff --git a/SwiftTimer.xcodeproj/project.pbxproj b/SwiftTimer.xcodeproj/project.pbxproj index bf84ddd..dde13ce 100644 --- a/SwiftTimer.xcodeproj/project.pbxproj +++ b/SwiftTimer.xcodeproj/project.pbxproj @@ -266,10 +266,11 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0910; TargetAttributes = { BF84D1681D6C016500B5B511 = { CreatedOnToolsVersion = 8.0; + LastSwiftMigration = 0910; ProvisioningStyle = Automatic; }; BF84D1761D6C01A600B5B511 = { @@ -406,12 +407,18 @@ BF84D1621D6C010700B5B511 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_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; @@ -425,18 +432,25 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; ONLY_ACTIVE_ARCH = YES; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; }; name = Debug; }; BF84D1631D6C010700B5B511 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; 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_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; @@ -448,6 +462,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; }; name = Release; }; @@ -510,7 +525,8 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -568,7 +584,8 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; diff --git a/SwiftTimer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/SwiftTimer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..3ddf867 --- /dev/null +++ b/SwiftTimer.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + BuildSystemType + Latest + + diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme index 48b2f59..70be071 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer iOS.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0910" + version = "1.3"> @@ -37,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme index 77b0822..b2b8d89 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer macOS.xcscheme @@ -1,7 +1,7 @@ + LastUpgradeVersion = "0910" + version = "1.3"> @@ -37,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme index f7646db..b85710c 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer tvOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer watchOS.xcscheme b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer watchOS.xcscheme index 0dc3c2b..99638fb 100644 --- a/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer watchOS.xcscheme +++ b/SwiftTimer.xcodeproj/xcshareddata/xcschemes/SwiftTimer watchOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" From 6193b08089d2137c13f90fb339d5ff4df63c79a7 Mon Sep 17 00:00:00 2001 From: liudong Date: Mon, 6 Nov 2017 18:35:49 +0800 Subject: [PATCH 10/11] Update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6be098d..7740be4 100644 --- a/README.md +++ b/README.md @@ -72,11 +72,11 @@ timer.start() CococaPods: ``` -pod 'SwiftTimer', '~> 1.0.3' +pod 'SwiftTimer', '~> 2.0' ``` Carthage: ~~~ github "100mango/SwiftTimer" -~~~ \ No newline at end of file +~~~ From 76871e3e37b55d684eb58c9ae711282b4399c97e Mon Sep 17 00:00:00 2001 From: liudong Date: Mon, 6 Nov 2017 18:42:12 +0800 Subject: [PATCH 11/11] add swift version --- .swift-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .swift-version diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..5186d07 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +4.0