Support Topics Documentation Slack YouTube Blog

[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.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!)")


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

Regards, Olga