Reputation: 23685
I'm declaring a block like this:
void (^callback)(NSString *_accessToken) = ^{
// do something interesting with _accessToken
}
but XCode keeps telling me
Incompatible block pointer types initializing void(^__strong)(NSString *__strong)
with an expression of type void (^)(void)
What am I doing wrong?
Upvotes: 2
Views: 533
Reputation: 8905
void (^callback)(NSString *) = ^(NSString *_accessToken){
// do something interesting with _accessToken
}
Upvotes: 4