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

migration to swift 3 #30

Open
wants to merge 4 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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ DerivedData
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Checkouts

Carthage/Build
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "antitypical/Result" ~> 2.1.0
github "antitypical/Result"
4 changes: 2 additions & 2 deletions Cartfile.private
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "Quick/Quick" "v0.9.3"
github "Quick/Nimble" "v4.1.0"
github "Quick/Quick"
github "Quick/Nimble"
6 changes: 3 additions & 3 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "Quick/Nimble" "v4.1.0"
github "Quick/Quick" "v0.9.3"
github "antitypical/Result" "2.1.3"
github "Quick/Nimble" "v5.1.1"
github "Quick/Quick" "v1.0.0"
github "antitypical/Result" "3.0.0"
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Nimble
Submodule Nimble updated 159 files
2 changes: 1 addition & 1 deletion Carthage/Checkouts/Quick
Submodule Quick updated 146 files
2 changes: 1 addition & 1 deletion DemoApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
return true
}
}
Expand Down
6 changes: 3 additions & 3 deletions DemoApp/CreateTodoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import SwiftFlux
class CreateTodoViewController: UITableViewController {
@IBOutlet weak var titleTextField: UITextField?

override func viewWillAppear(animated: Bool) {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
titleTextField?.becomeFirstResponder()
}
Expand All @@ -21,11 +21,11 @@ class CreateTodoViewController: UITableViewController {
guard let title = titleTextField?.text else { return }
guard title.characters.count > 0 else { return }

ActionCreator.invoke(TodoAction.Create(title: title))
ActionCreator.invoke(action: TodoAction.Create(title: title))
self.dismiss()
}

@IBAction func dismiss() {
self.dismissViewControllerAnimated(true, completion: nil)
self.dismiss(animated: true, completion: nil)
}
}
6 changes: 3 additions & 3 deletions DemoApp/TodoAction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct TodoAction {
Todo(title: "ToDo 2"),
Todo(title: "ToDo 3")
]
dispatcher.dispatch(self, result: Result(value: todos))
dispatcher.dispatch(action: self, result: Result(value: todos))
}
}

Expand All @@ -28,7 +28,7 @@ struct TodoAction {
let title: String

func invoke(dispatcher: Dispatcher) {
dispatcher.dispatch(self, result: Result(value: Todo(title: title)))
dispatcher.dispatch(action: self, result: Result(value: Todo(title: title)))
}
}

Expand All @@ -37,7 +37,7 @@ struct TodoAction {
let index: Int

func invoke(dispatcher: Dispatcher) {
dispatcher.dispatch(self, result: Result(value: index))
dispatcher.dispatch(action: self, result: Result(value: index))
}
}
}
24 changes: 13 additions & 11 deletions DemoApp/TodoListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,30 @@ class TodoListViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()

self.todoStore.subscribe { () in
let _ = self.todoStore.subscribe(store: self.todoStore) {
self.tableView.reloadData()
}
ActionCreator.invoke(TodoAction.Fetch())
ActionCreator.invoke(action: TodoAction.Fetch())
}

@IBAction func createTodo() {
ActionCreator.invoke(TodoAction.Create(title: "New ToDo"))
ActionCreator.invoke(action: TodoAction.Create(title: "New ToDo"))
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.todoStore.todos.count
}

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("TodoCell") as UITableViewCell!
cell.textLabel!.text = self.todoStore.todos[indexPath.row].title
return cell
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "TodoCell") as UITableViewCell!
cell?.textLabel!.text = self.todoStore.todos[indexPath.row].title
return cell!

override func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
ActionCreator.invoke(TodoAction.Delete(index: indexPath.row))
}

override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
ActionCreator.invoke(action: TodoAction.Delete(index: indexPath.row))
}

}

25 changes: 13 additions & 12 deletions DemoApp/TodoStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,35 @@ class TodoStore : Store {
private(set) var todos = [Todo]()

init() {
ActionCreator.dispatcher.register(TodoAction.Fetch.self) { (result) in

let _ = ActionCreator.dispatcher.register(type: TodoAction.Fetch.self) { (result) in
switch result {
case .Success(let box):
case .success(let box):
self.todos = box
self.emitChange()
case .Failure(_):
case .failure(_):
break;
}
}

ActionCreator.dispatcher.register(TodoAction.Create.self) { (result) in
let _ = ActionCreator.dispatcher.register(type: TodoAction.Create.self) { (result) in
switch result {
case .Success(let box):
self.todos.insert(box, atIndex: 0)
case .success(let box):
self.todos.insert(box, at: 0)
self.emitChange()
case .Failure(_):
case .failure(_):
break;
}
}

ActionCreator.dispatcher.register(TodoAction.Delete.self) { (result) in
let _ = ActionCreator.dispatcher.register(type: TodoAction.Delete.self) { (result) in
switch result {
case .Success(let box):
self.todos.removeAtIndex(box)
case .success(let box):
self.todos.remove(at: box)
self.emitChange()
case .Failure(_):
case .failure(_):
break;
}
}
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ It provides concept of "one-way data flow" with **type-safe** modules by Swift l

# Requirements

- Swift 2.2 or later
- Swift 3 or later
- iOS 8.0 or later
- Mac OS 10.9 or later
- watch OS 2.0 or later
Expand Down
44 changes: 22 additions & 22 deletions SwiftFlux.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,40 +135,40 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
CA1C3FEA1B7919390048126F /* ActionCreatorSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionCreatorSpec.swift; sourceTree = "<group>"; };
CA1C3FEA1B7919390048126F /* ActionCreatorSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ActionCreatorSpec.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CA3159FB1B6D2FB5004A8F2C /* SwiftFlux.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftFlux.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CA315A051B6D2FB5004A8F2C /* SwiftFluxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftFluxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
CA70C3541BFF82AA00EABF70 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = "<group>"; };
CA7C53FE1B6DF17300F393CB /* StoreSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreSpec.swift; sourceTree = "<group>"; };
CA7C53FE1B6DF17300F393CB /* StoreSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = StoreSpec.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CACA8E391B6CD85F00F051B8 /* DemoApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DemoApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
CACA8E3C1B6CD85F00F051B8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CACA8E3D1B6CD85F00F051B8 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
CACA8E3F1B6CD85F00F051B8 /* TodoListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodoListViewController.swift; sourceTree = "<group>"; };
CACA8E3F1B6CD85F00F051B8 /* TodoListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TodoListViewController.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CACA8E421B6CD85F00F051B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
CACA8E441B6CD85F00F051B8 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
CACA8E471B6CD85F00F051B8 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
CACA8E681B6CD91200F051B8 /* TodoAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TodoAction.swift; sourceTree = "<group>"; };
CACA8E6B1B6CD93E00F051B8 /* Todo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Todo.swift; sourceTree = "<group>"; };
CACA8E6D1B6CD95600F051B8 /* TodoStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TodoStore.swift; sourceTree = "<group>"; };
CACA8E6D1B6CD95600F051B8 /* TodoStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = TodoStore.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CACC47F51B6B9DDA00FDF2BF /* SwiftFlux.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftFlux.framework; sourceTree = BUILT_PRODUCTS_DIR; };
CACC47F91B6B9DDA00FDF2BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CACC47FA1B6B9DDA00FDF2BF /* SwiftFlux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftFlux.h; sourceTree = "<group>"; };
CACC48001B6B9DDA00FDF2BF /* SwiftFluxTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftFluxTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
CACC48061B6B9DDA00FDF2BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CACC48111B6B9E4900FDF2BF /* Dispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dispatcher.swift; sourceTree = "<group>"; };
CACC48131B6B9E8000FDF2BF /* Action.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Action.swift; sourceTree = "<group>"; };
CACC48151B6BA00D00FDF2BF /* Store.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Store.swift; sourceTree = "<group>"; };
CACC48151B6BA00D00FDF2BF /* Store.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Store.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CAEAF03B1BFB97DF0021CC66 /* ReduceStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReduceStore.swift; sourceTree = "<group>"; };
CAEAF03E1BFBA4EB0021CC66 /* ReduceStoreSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReduceStoreSpec.swift; sourceTree = "<group>"; };
CAEAF03E1BFBA4EB0021CC66 /* ReduceStoreSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ReduceStoreSpec.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CAEF56D21B6D36D3005684E2 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Quick.framework; sourceTree = "<group>"; };
CAEF56D31B6D36D3005684E2 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = "<group>"; };
CAEF56D71B6D36D3005684E2 /* Quick.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Quick.framework; sourceTree = "<group>"; };
CAEF56D81B6D36D3005684E2 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Result.framework; sourceTree = "<group>"; };
CAEF5DB01B6D3927005684E2 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Nimble.framework; sourceTree = "<group>"; };
CAEF5DB51B6D3951005684E2 /* Nimble.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Nimble.framework; sourceTree = "<group>"; };
CAEF5DBA1B6D3989005684E2 /* DispatcherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatcherSpec.swift; sourceTree = "<group>"; };
CAEF5DBA1B6D3989005684E2 /* DispatcherSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = DispatcherSpec.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CAFDEA161BFF59E000AF7A09 /* StoreBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreBase.swift; sourceTree = "<group>"; };
CAFDEA191BFF5D4E00AF7A09 /* StoreBaseSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreBaseSpec.swift; sourceTree = "<group>"; };
CAFDEA191BFF5D4E00AF7A09 /* StoreBaseSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = StoreBaseSpec.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
CAFDEA1D1BFF64F700AF7A09 /* CreateTodoViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CreateTodoViewController.swift; sourceTree = "<group>"; };
CAFDEA241BFF749B00AF7A09 /* SwiftFlux.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftFlux.framework; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -796,7 +796,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
Expand Down Expand Up @@ -824,7 +824,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
Expand Down Expand Up @@ -853,7 +853,7 @@
PRODUCT_NAME = SwiftFluxTests;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "i386 x86_64";
};
name = Debug;
Expand All @@ -876,7 +876,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SwiftFluxTests;
SDKROOT = macosx;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
VALID_ARCHS = "i386 x86_64";
};
name = Release;
Expand All @@ -899,7 +899,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0.1;
};
name = Debug;
};
Expand All @@ -917,7 +917,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0.1;
};
name = Release;
};
Expand Down Expand Up @@ -967,7 +967,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s";
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -1013,7 +1013,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "arm64 armv7 armv7s";
Expand Down Expand Up @@ -1046,7 +1046,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -1073,7 +1073,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(PROJECT_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -1094,7 +1094,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SwiftFluxTests;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -1111,7 +1111,7 @@
LIBRARY_SEARCH_PATHS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = "jp.mog2dev.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SwiftFluxTests;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -1133,7 +1133,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand All @@ -1156,7 +1156,7 @@
PRODUCT_NAME = "$(PROJECT_NAME)";
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 2.3;
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 4;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
};
Expand Down
4 changes: 2 additions & 2 deletions SwiftFlux/Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Result

public protocol Action {
associatedtype Payload
associatedtype Error: ErrorType = NSError
associatedtype ActionError: Error = NSError
func invoke(dispatcher: Dispatcher)
}

Expand All @@ -22,6 +22,6 @@ public class ActionCreator {
}

public class func invoke<T: Action>(action: T) {
action.invoke(self.dispatcher)
action.invoke(dispatcher: self.dispatcher)
}
}
Loading