Skip to content
Permalink
Browse files

Podspec and README changes

  • Loading branch information...
Michael Gray
Michael Gray committed Feb 3, 2017
1 parent 888d595 commit 6e1f99fc25c71dcc4f84851c163467a0e3831468
Showing with 12 additions and 13 deletions.
  1. +1 −1 FutureKit.podspec
  2. +11 −12 README.md
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FutureKit'
s.version = '2.3.0'
s.version = '3.0.0'
s.license = 'MIT'
s.summary = 'A Swift based Future/Promises Library for IOS and OS X.'
s.homepage = 'https://github.com/FutureKit/FutureKit'
@@ -8,27 +8,28 @@

A Swift based Future/Promises Library for IOS and OS X.

Note - FutureKit is works Swift 2.x/3.0
Note - The latest FutureKit is works 3.0

For Swift 2.x compatibility use version 2.3.0

FutureKit is a Swift implementation of Futures and Promises, but modified specifically for iOS/OSX programmers.
You can ready the wikipedia article here:
http://en.wikipedia.org/wiki/Futures_and_promises

FutureKit uses Swift generic classes, to allow you to easily deal with asynchronous/multi-threaded issues when coding for iOS or OSX.

- is 100% Swift. It ONLY currently supports Swift 2.x/3.0 and Xcode 8+.
- is 100% Swift. It currently supports Swift 2.x/3.0 and Xcode 8+. For Swift 2.x compatibility, use the version 2.3.0.

- is type safe. It uses Swift Generics classes that can automatically infer the type you wish to return from asynchronous logic. And supports both value and reference Swift types (Both 'Any' types, and 'AnyObject/NSObject' types.)

- Is Swift 2.0 error handling friendly. All FutureKit handler methods can already catch and complete a Future using any ErrorType. So you don't need to wrap your code with 'do/try/catch'.
- Is Swift error handling friendly. All FutureKit handler methods can already catch and complete a Future using any ErrorType. So you don't need to wrap your code with 'do/try/catch'.

- FutureKit in Swift 2.0 is designed to simplify error handling, allowing you to attach a single error handler that can catch any error that may occur. This can make dealing with composing async operations much easier and more reliable.
- FutureKit in Swift is designed to simplify error handling, allowing you to attach a single error handler that can catch any error that may occur. This can make dealing with composing async operations much easier and more reliable.

- uses simple to understand methods (onComplete/onSuccess/onFail etc) that let's you simplify complex asynchronous operations into clear and simple to understand logic.

- is highly composable, since any existing Future can be used to generate a new Future. And Errors and Cancelations can be automatically passed through, simplifying error handling logic.
-
- is highly composeable, since any existing Future can be used to generate a new Future. And Errors and Cancelations can be automatically passed through, simplifying error handling logic.
-
- Super easy cancelation composition (which is a fancy way to say cancel works when you want it to automatically). Future's are designed so there is never any confusion about whether an asynchronous operation completed, failed, or was canceled. And the consumer has full control over whether he needs to be notified that the operation was canceled or not. (0% confusion about whether your completion blocks will get called when the operation is cancelled).

- works well editing code within Xcode auto-completion. The combination of type-inference and code-completion makes FutureKit coding fast and easy.
@@ -69,7 +70,7 @@ Instead we are gonna do this.
let imageFuture : Future<UIImage> = MyApiClass().getAnImageFromServer()
let blurImageFuture = imageFuture.onSuccess(.UserInitiated) { (image) -> UIImage in
let blurredImage = doBlurEffect(image)
return blurredImage
return blurredImage
}
```

@@ -88,7 +89,7 @@ Or I could rewite it all in one line:
MyApiClass().getAnImageFromServer()
.onSuccess(.UserInitiated) { (image) -> UIImage in {
let blurredImage = doBlurEffect(image)
return blurredImage
return blurredImage
}.onSuccess(.Main) { (blurredImage) -> Void in
imageView.image = blurredImage;
}.onError { error in
@@ -121,7 +122,7 @@ func getAnImageFromServer(url : NSURL) -> Future<UIImage> {
A Promise<T> is a promise to send something back a value (of type T) in the future. When it's ready.. A Promise has to be completed with either Success/Fail or Cancelled. Don't break your promises! Always complete them. And everyone will be happy. Especially your code that is waiting for things.
But it also means the API doesn't really need to bake a whole bunch of custom callback block handlers that return results. And worry about what dispatch_queue those callback handlers have to running in. Do you dispatch to mainQ before you call your callback handlers? Or after? Nobody seems to agree.
But it also means the API doesn't really need to bake a whole bunch of custom callback block handlers that return results. And worry about what dispatch_queue those callback handlers have to running in. Do you dispatch to mainQ before you call your callback handlers? Or after? Nobody seems to agree.
But the Future object already offers a lot of cool built ways to get told when data is ready and when it fails. And can handle which GCD queue is required for this reply.
@@ -178,9 +179,7 @@ The Xcode Playgrounds probably require Xcode 6.3 (in order to see the Markup cor
If you are impatient, or not near your copy of Xcode, you can try to read the first intro "raw" playground here:
https://github.com/FutureKit/FutureKit/blob/master/FutureKit-Future.playground/Contents.swift
There is also docs directory, that is generated using jazzy. https://github.com/realm/jazzy. The plan is to get as close to 100% as possible (We are at 25%!). So currently there is a lot of missing documentation.
# Help out!
Help out!
I would love it to get feedback! Tell me what you think is wrong. You can follow @swiftfuturekit to get announcements (when we make them).

0 comments on commit 6e1f99f

Please sign in to comment.
You can’t perform that action at this time.