so I'm trying to use a performRequestWithHandler block on a SLRequest object in my Swift iOS app and I can't deal with the NSError object. This is what how my code looks :
posts.performRequestWithHandler({(response:NSData!, urlResponse:NSHTTPURLResponse!, error:NSError!) in
self.data = NSJSONSerialization.JSONObjectWithData(response, options: NSJSONReadingOptions.MutableLeaves, error: &error)
})
And I have an error on the &error
that says : 'NSError' is not convertible to '@lvalue inout $T9' in Swift
. Does anyone know what that means ?
Thank you in advance.
(I'm using Xcode Beta 6 v7 with OS X 10.10)