Hi,
I recently started getting this error on devices that had just worked 1 hour ago. Did something happen to the server?
Optional(FAULT = ‘5000’ [Unable to retrieve device. Invalid device ID.] <Unable to retrieve device. Invalid device ID.> )
Here’s the code that I’m running.
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
// Get previous channel registrations
var error: Fault?
let registrations = backendless.messaging.getRegistrationError(&error)
if error == nil {
backendless.messaging.registerDevice(registrations.channels as! [String], expiration: nil, token: deviceToken, error: &error)
print("\nRegistering device token")
print(registrations.channels)
print(" ")
} else {
print(error)
}
}