[iOS] How can I migrate backendless 3.0.46 to 4.0b14

Dear Backendless support team:

I have a question to ask you. I want to migrate backendless 3.0.46 to 4.0b14, but I got an error message “Cannot invoke ‘getRegistration’ with no arguments”. I don’t know how to fix it. Could you help me, please.


func registerUserDeviceId(user: BackendlessUser) {
    if backendless!.messagingService.getRegistration().deviceId != nil {
        let deviceId = backendless!.messagingService.getRegistration().deviceId
        let properties = [kDEVICEID : deviceId]
        backendless!.userService.currentUser!.updateProperties(properties)
        backendless!.userService.update(backendless!.userService.currentUser, response: {
            newUser in
            print("updated device id in backendless")
        }, error: {
            fault in
            print("Fault coulnt update user device id \(fault!.detail!)")
        })
    }
}

http://support.backendless.com/public/attachments/adfce3b9ca950d2e1e9d12cf6f97a734.png</img>

Hello!

The getRegistration method takes deviceId as parameter. Please check this doc.

Regards, Olga