I\'m trying to return a NSMutableArray
from my block in my method, but when I add the line return [responseString JSONValue];
, I get some compiler
What are you expecting returning an object to do? Presumably the completion block that you hand to ASIFormDataRequest
is declared as void (^)()
(or dispatch_block
or some other typedef which evaluates to void (^)()
). Given this, the code calling the block isn't expecting a return value. It would be like implementing a method declared - (void)foo
and trying to return an object from that; it just doesn't make sense.
Edit: After re-reading your code, I expect what you're really trying to do is returning a value from -getTodayData:
. However you're executing an asynchronous request. The method -getTodayData:
has already returned long before your block is executed.