mardi 23 décembre 2014

What is wrong in the Swift block syntax below?

I am integrating AWS S3 service in my Swift based project but I stuck in the sysntax below as there is no description for the usage of API with Swift so I was trying to convert the code by myself.



transferManager.download(downloadRequest).continueWithExecutor(BFExecutor.mainThreadExecutor(), withBlock:
{ (task:BFTask!) -> AnyObject! in
println("test")
})


I am getting following error!



Type '()' does not conform to protocol 'AnyObject'


Please help ASAP! Thanks!





Aucun commentaire:

Enregistrer un commentaire