Support Topics Documentation Slack YouTube Blog

Xcode swift strange build bug

Strange bug.

I was building the app without build errors using
pod ‘Backendless’, ‘4.0b7’

Then I wanted to add the new push notifications etc so changed to
pod ‘Backendless’, ‘5.2.1’ (and also tried just) pod ‘Backendless’

but it gives me a build error on

backendless?.userService.logout(
{ ( user : AnyObject!) -> () in
//print(“User logged out.”)
} as! (Any?) -> Void,
error: { ( fault : Fault!) -> () in
//print(“Server reported an error: (fault)”)
})

error is
Cannot invoke ‘logout’ with an argument list of type ‘((Any?) -> Void, error: (Fault?) -> ())’

Change the pod back to pod ‘Backendless’, ‘4.0b7’ and it builds ok again?

Any ideas?

Hello mike,

the logout method signature has been changed and doesn’t return anything in response. Please change it to:

backendless?.userService.logout({
    //print(“User logged out.”)
} , error: { ( fault : Fault!) -> () in
    //print(“Server reported an error: (fault)”)
})

Regardds,
Olha

Thanks Olha, that worked.