I am attempting to register a device for push notifications on iOS as described using the following code:
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
NSLog(@"Registering for remote notifications. Token %@",devToken);
NSString *deviceTokenStr = [backendless.messagingService deviceTokenAsString:devToken];
@try {
NSString *deviceRegistrationId = [backendless.messagingService registerDeviceToken:deviceTokenStr];
NSLog(@"deviceToken = %@, deviceRegistrationId = %@", deviceTokenStr, deviceRegistrationId);
}
@catch (Fault *fault) {
NSLog(@"deviceToken = %@, FAULT = %@ <%@>", deviceTokenStr, fault.message, fault.detail);
}
}
Unfortunately, I get the following fault message.
2015-04-14 21:32:08.621 CatSynthTheApp[636:331318] MessageWriter -> getWriter: (ADDITIONAL) <StringWriter: 0x17000a9d0> for type = __NSCFConstantString
2015-04-14 21:32:09.063 CatSynthTheApp[636:331318] deviceToken = 46ce53e831f9d00fddaa8c9ddc77d203c213453b37aef2a5427e0079e809a38b, FAULT = HttpEngine: INVALID statusCode 404 <HttpEngine: INVALID statusCode 404>
The device token is valid as NSData and a hex string and works fine with a local python script to send push notifications.
Any ideas?