From 73b722e421b8aeb800b4d0aacf9708583455663b Mon Sep 17 00:00:00 2001 From: Vanderlei Martinelli Date: Fri, 28 Oct 2016 15:26:12 -0200 Subject: [PATCH 1/6] Minor warning fix --- Source/AlecrimAsyncKit/Core/MutuallyExclusiveCondition.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/AlecrimAsyncKit/Core/MutuallyExclusiveCondition.swift b/Source/AlecrimAsyncKit/Core/MutuallyExclusiveCondition.swift index 9dd6fa3..c1d7a64 100644 --- a/Source/AlecrimAsyncKit/Core/MutuallyExclusiveCondition.swift +++ b/Source/AlecrimAsyncKit/Core/MutuallyExclusiveCondition.swift @@ -26,7 +26,7 @@ public final class MutuallyExclusiveCondition: TaskCondition { /// An enumeration with the default categories used by the condition. /// /// - Alert: The category that represents a potential modal alert to the user. - private enum Category: String { + fileprivate enum Category: String { case alert = "_CAAAK.METC.DC.Alert" } From 3fc2eb4a0ddfa809637cf40261c051a30182bfb1 Mon Sep 17 00:00:00 2001 From: Vanderlei Martinelli Date: Fri, 28 Oct 2016 15:26:28 -0200 Subject: [PATCH 2/6] Updated project to the recommended settings --- Source/AlecrimAsyncKit.xcodeproj/project.pbxproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj index 01e557a..ab3d141 100644 --- a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj +++ b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj @@ -228,7 +228,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = Alecrim; TargetAttributes = { 14E585BA1B7803EC003EC4DC = { @@ -315,8 +315,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -368,8 +370,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; From a12588120403899259082789a2a06246b66aa409 Mon Sep 17 00:00:00 2001 From: Vanderlei Martinelli Date: Sat, 3 Dec 2016 17:16:07 -0200 Subject: [PATCH 3/6] Added DispatchQueue extensions --- .../AlecrimAsyncKit.xcodeproj/project.pbxproj | 4 ++++ .../Extensions/DispatchQueue+Extensions.swift | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 Source/AlecrimAsyncKit/Extensions/DispatchQueue+Extensions.swift diff --git a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj index ab3d141..8e87931 100644 --- a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj +++ b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 1410E17C1DF298A200FA2945 /* DispatchQueue+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1410E17B1DF298A200FA2945 /* DispatchQueue+Extensions.swift */; }; 1413F62E1BDCAE8B001049D5 /* Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1413F62D1BDCAE8B001049D5 /* Protocols.swift */; }; 1416E08D1BDC931A00F1EA73 /* TaskObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1416E08C1BDC931A00F1EA73 /* TaskObserver.swift */; }; 142561B51BE31B9D00A4C974 /* TaskOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142561B41BE31B9D00A4C974 /* TaskOperation.swift */; }; @@ -38,6 +39,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 1410E17B1DF298A200FA2945 /* DispatchQueue+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+Extensions.swift"; sourceTree = ""; }; 1413F62D1BDCAE8B001049D5 /* Protocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Protocols.swift; sourceTree = ""; }; 1416E08C1BDC931A00F1EA73 /* TaskObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TaskObserver.swift; sourceTree = ""; }; 142561B41BE31B9D00A4C974 /* TaskOperation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TaskOperation.swift; sourceTree = ""; }; @@ -145,6 +147,7 @@ 14A701751CF9738300566C11 /* Extensions */ = { isa = PBXGroup; children = ( + 1410E17B1DF298A200FA2945 /* DispatchQueue+Extensions.swift */, 14A701761CF9738300566C11 /* SequenceType+Extensions.swift */, ); path = Extensions; @@ -287,6 +290,7 @@ 148513A51B9BD15100FAB0FA /* Errors.swift in Sources */, 1437EC371D105946000D5C02 /* Queue.swift in Sources */, 148513A41B9BD15100FAB0FA /* AsyncAwait.swift in Sources */, + 1410E17C1DF298A200FA2945 /* DispatchQueue+Extensions.swift in Sources */, 148513AE1B9BD38100FAB0FA /* LocationPermissionCondition.swift in Sources */, 1485139D1B9BD15100FAB0FA /* DelayCondition.swift in Sources */, 1485139F1B9BD15100FAB0FA /* SilentCondition.swift in Sources */, diff --git a/Source/AlecrimAsyncKit/Extensions/DispatchQueue+Extensions.swift b/Source/AlecrimAsyncKit/Extensions/DispatchQueue+Extensions.swift new file mode 100644 index 0000000..b85b177 --- /dev/null +++ b/Source/AlecrimAsyncKit/Extensions/DispatchQueue+Extensions.swift @@ -0,0 +1,22 @@ +// +// DispatchQueue+Extensions.swift +// AlecrimAsyncKit +// +// Created by Vanderlei Martinelli on 2016-12-03. +// Copyright © 2016 Alecrim. All rights reserved. +// + +import Foundation + +extension DispatchQueue { + + @discardableResult + public func asyncTask(using closure: @escaping () -> V) -> NonFailableTask { + return asyncEx { task in + self.async { + task.finish(with: closure()) + } + } + } + +} From 60b1e8663da7e1e863760f3fe95207c59f3d61aa Mon Sep 17 00:00:00 2001 From: Vanderlei Martinelli Date: Fri, 30 Dec 2016 16:35:55 -0200 Subject: [PATCH 4/6] Updated projects to recommended settings --- .../AlecrimAsyncKitExampleiOS.xcodeproj/project.pbxproj | 6 +++++- .../xcshareddata/xcschemes/AlecrimAsyncKit.xcscheme | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Examples/AlecrimAsyncKitExampleiOS/AlecrimAsyncKitExampleiOS.xcodeproj/project.pbxproj b/Examples/AlecrimAsyncKitExampleiOS/AlecrimAsyncKitExampleiOS.xcodeproj/project.pbxproj index 18152e8..eea7aa3 100644 --- a/Examples/AlecrimAsyncKitExampleiOS/AlecrimAsyncKitExampleiOS.xcodeproj/project.pbxproj +++ b/Examples/AlecrimAsyncKitExampleiOS/AlecrimAsyncKitExampleiOS.xcodeproj/project.pbxproj @@ -118,7 +118,7 @@ 14BC230B1B8EFC3000EC2AED /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0820; ORGANIZATIONNAME = Alecrim; TargetAttributes = { 14BC23121B8EFC3000EC2AED = { @@ -203,8 +203,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -248,8 +250,10 @@ 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; diff --git a/Source/AlecrimAsyncKit.xcodeproj/xcshareddata/xcschemes/AlecrimAsyncKit.xcscheme b/Source/AlecrimAsyncKit.xcodeproj/xcshareddata/xcschemes/AlecrimAsyncKit.xcscheme index 0406e2e..1a20ed7 100644 --- a/Source/AlecrimAsyncKit.xcodeproj/xcshareddata/xcschemes/AlecrimAsyncKit.xcscheme +++ b/Source/AlecrimAsyncKit.xcodeproj/xcshareddata/xcschemes/AlecrimAsyncKit.xcscheme @@ -1,6 +1,6 @@ Date: Fri, 30 Dec 2016 16:37:39 -0200 Subject: [PATCH 5/6] Added Package.swift --- Package.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8bc08a6 --- /dev/null +++ b/Package.swift @@ -0,0 +1,14 @@ +// +// Package.swift +// AlecrimAsyncKit +// +// Created by Vanderlei Martinelli on 2016-12-30. +// Copyright © 2016 Alecrim. All rights reserved. +// + +import PackageDescription + +let package = Package( + name: "AlecrimAsyncKit", + exclude: ["Examples"] +) From 8a9e3e53268c636139b90479401c6aa5bb824d25 Mon Sep 17 00:00:00 2001 From: Vanderlei Martinelli Date: Fri, 30 Dec 2016 16:39:18 -0200 Subject: [PATCH 6/6] Bumped version and build number --- AlecrimAsyncKit.podspec | 2 +- Source/AlecrimAsyncKit.xcodeproj/project.pbxproj | 4 ++-- Source/AlecrimAsyncKit/Info.plist | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AlecrimAsyncKit.podspec b/AlecrimAsyncKit.podspec index 8cb246b..7bab29c 100644 --- a/AlecrimAsyncKit.podspec +++ b/AlecrimAsyncKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "AlecrimAsyncKit" - s.version = "3.0" + s.version = "3.0.1" s.summary = "Bringing async and await to Swift world with some flavouring." s.homepage = "https://github.com/Alecrim/AlecrimAsyncKit" diff --git a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj index 8e87931..e96a1c6 100644 --- a/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj +++ b/Source/AlecrimAsyncKit.xcodeproj/project.pbxproj @@ -414,7 +414,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 275; + CURRENT_PROJECT_VERSION = 301; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -437,7 +437,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; CLANG_ENABLE_MODULES = YES; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 275; + CURRENT_PROJECT_VERSION = 301; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; diff --git a/Source/AlecrimAsyncKit/Info.plist b/Source/AlecrimAsyncKit/Info.plist index 15a53d4..dd004d7 100644 --- a/Source/AlecrimAsyncKit/Info.plist +++ b/Source/AlecrimAsyncKit/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.0 + 3.0.1 CFBundleSignature ???? CFBundleVersion