jay-kerr
(Jay Kerr)
September 28, 2017, 5:55pm
1
When registering for push in my appDelegate the registration fails with the following error:
java.lang.NullPointerException
Push WAS working properly with this app until now.
APPID: 408D24A7-14B7-2887-FF2C-64C0CC571300
Testing tethered to Xcode, with my certificate in Sandbox mode.
Hi Jay,
What version of the Backendless SDK for iOS you have installed?
Regards,
Mark
jay-kerr
(Jay Kerr)
September 28, 2017, 6:03pm
3
Using Backendless (4.0.15)
Do you set a channel name when you register the device?
jay-kerr
(Jay Kerr)
September 28, 2017, 6:09pm
5
I register with the following code:
#pragma mark Push Notifications
(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[backendless.messaging registerDevice:deviceToken response:^(NSString *response) {
DLog(@“Backendless registered for push notifications\n%@”, response);
} error:^(Fault *fault) {
DLog(@“Error registering Backendless for push notifications: %@”, fault.detail);
}];
}
Could you please modify the signature to specify the “default” channel and try again?
jay-kerr
(Jay Kerr)
September 28, 2017, 6:23pm
7
Thanks, Mark, that fixed the issue, at least in the sandbox. I’ll build an enterprise app and test in production mode later today.
JK
Good to hear. We will make an adjustment on the server to support the use-case when a device is registered without an explicit reference to a channel.
Regards,
Mark
jay-kerr
(Jay Kerr)
September 28, 2017, 8:11pm
9
My app always sends notifications to all devices, so I don’t use any other Channels. Your API documentation says the following about the registerDevice method channel argument:
For the method without the argument, the “Default” channel is used;
JK
mark-piller
(Mark Piller)
September 28, 2017, 8:13pm
10
You are correct, it is supposed to work like, but there was a regression in the 4.3.0 release. We will be fixing it ASAP.
Regards,
Mark