jeudi 30 juillet 2015

Send Compatible pointer block types with AWSContinuationBlock

I'm getting the following error when trying to run a block with AWSS3TransferManager:

incompatible block pointer types sending 'id ((^)(void)) to parameter of type 'AWSContinuationBlock' (aka id (^)(AWSTask *__strong))

I believe this is due to different block types where I am currently not returning any value while it expects an AWSTask, but I'm not sure how to return an AWSTask.

_uploadRequest = [AWSS3TransferManagerUploadRequest new];

AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager];
[[transferManager upload:_uploadRequest] continueWithExecutor:[BFExecutor mainThreadExecutor] withBlock:^id(BFTask *task){

    if (task.error){
        NSLog(@"%@",task.error);
    }
}];




Aucun commentaire:

Enregistrer un commentaire