When i call the PFcloud function from normal it return the correct count how ever when i call it with selector, the selector call back function is not fired,
Appreciate if any can can point to me what is the mistake in my code.
Working block - it print out the count successfully
PFCloud.callFunctionInBackground(CloudFunctions.getBookingCount, withParameters: ["camp": "pmAwLDTNc6"], block: {
(result: AnyObject!, error: NSError!) -> Void in
if ( error === nil) {
NSLog("Booking Count call back: \(result) ")
}
else if (error != nil) {
NSLog("error in helloWorld: \(error.userInfo)")
}
})
Not Working block (Selector ) - selector function not called
PFCloud.callFunctionInBackground(CloudFunctions.getBookingCount, withParameters: ["camp": "pmAwLDTNc6"], target: self, selector: "block:")
func block (result: AnyObject!, error: NSError!) {
if ( error === nil) {
NSLog("Booking Count from Block: \(result) ")
}
else if (error != nil) {
NSLog("error in helloWorld: \(error.userInfo)")
}
}
Question:
I need someone to highlight to my the error in writing the selector function as the selector function is not called.
Thanks