Parse+PromiseKit is a category that adds PromiseKit integration to the
Parse SDK.
Note: The API is subject to change until v1.0.
Add pod 'Parse+PromiseKit' to your Podfile.
The category for PFFacebookUtils is available as a subspec.
Add pod 'Parse+PromiseKit/FacebookUtils' to your Podfile.
Import Parse+PromiseKit.h or ParseFacebookUtils+PromiseKit.h as appropriate.
Method names prefix Parse's asynchronous method names with promise and remove InBackground, etc. Promises are fulfilled
with the same result signature as the appropriate completion block (with a few exceptions).
[object saveInBackground] becomes [object promiseSave]
[user signUpInBackground] becomes [user promiseSignUp]
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (error) {
// handle error
} else {
// do something with objects
}
}]becomes
[query promiseFindObjects].then(^(NSArray *objects) {
// do something with objects
}).catch(^(NSError *error) {
// handle error
});Parse+PromiseKit is free software and is released under the Apache v2
license. See LICENSE for more information.
Copyright © 2014 Hathway Inc.