iOS backendless.messaging registerDevice error INVALID statusCode 400

I’m calling backendless.messaging registerDevice on iOS and the error callback is called with fault “FAULT = ‘400’ [HttpEngine: INVALID statusCode 400] <HttpEngine: INVALID statusCode 400>”. Any idea how to fix this error?
App ID = 28A40095-0806-3BDD-FFC1-FED764753200
pod version 4.0.21
excerpt from AppDelegate.m:

  • (void) application:(UIApplication*)application
    didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
    {
    [backendless.messaging registerDevice:deviceToken
    channels:@[@“groningen”]
    response:^(NSString *result) {
    NSLog(@“Device token = %@”, deviceToken);
    }
    error:^(Fault *fault) {
    NSLog(@“Server reported an error: %@”, fault.description);
    }];
    }

Everything works fine for me - my test device appears on your channel.
Please check if you have the correct APP ID, API KEY and SERVER URL.
You can also generate the Push Templates project to check if something is wrong (in the console: Code Generation tab > iOS > Push notifications).

Regards, Olga

Thanks for pointing that out! I was still using the old App ID and Key (migrating from v3 to v4).
Although the call to registerDevice now succeeds (response callback is called and device token is in the logging) I still cannot see my iOS device registration on my channel. What do you mean by correct SERVER URL?

Server url is "http://api.backendless.com". It is the default value but you can change it manually.

I can see your device it the iOS devices tab (screenshot attached).

Regards, Olga

That’s awesome. I wasn’t aware that the devices tab on top is filtered by the platform selection on the bottom. To me it looks like the Android / iOS selection tabs on the bottom are for sending manual push notifications, not for filtering the list of registered devices on the top, because there is a white divider in the UI with a title Send push notification.

Anyway, thanks again for your great support!

Just to note, we’re already on the final stages of changing the UI on the messaging tab, so it won’t have ambiguities like this soon :slight_smile: