Closed elizabethsdavis closed 6 years ago
Hi @elizabethsdavis
I'm sorry for the issue that you're experiencing, I'll look into it and get back to you. Many thanks for the very detailed and throughout writeup about the issue.
We're doing some changes related to the synchronisation strategy in the SDK so future version of the SDK might resolve your issue (#72).
In the meantime I would also recommend updating the SDK version to the latest stable version: 0.10.10
.
I've noticed that you've opened a ticket on the Intercom. I will continue the conversation there.
I appreciate that this is closed (and old) but I too am experiencing this issue on v1.2.0 - was a solution ever made for this?
As per the original issue, I too am registering the device sometime after the instance is started.
Hey @dansinclair25
We're working on a fix for this. It should be fixed in the upcoming release that is coming out soon.
Thanks!
I've integrated the Beams iOS SDK
0.10.7
into one of my apps and have consistently received a crash when users are registering devices for notifications.PushNotifications.swift line 116
specialized PushNotifications.(registerDeviceToken(Data, completion : () -> ()) -> ()).(closure #1)
Here are the crash logs from Fabric:
For more context around our specific situation:
(1) Also even our users who have this crash are still successfully registered and can receive notifications.
(2) We implement the SDK documentation almost exactly, with
pushNotifications.registerDeviceToken
(and subscribing) in theapplication:didRegisterForRemoteNotificationsWithDeviceToken:
handler andpushNotifications.start
in theapplication:didFinishLaunchingWithOptions:
handler.One notable difference:
While the documentation recommends registering for notifications in the
application:didFinishLaunchingWithOptions:
handler, we prefer to wait to request notification authorization from the user until a little later in our new user onboarding flow.Instead we manually request notification authorization later, using the standard
UNUserNotificationCenter
documentation. From reading through your source code, it seems to parallel what you do in yourpushNotifications.registerForRemoteNotifications
method implemented, which we do not call.My initial hunch:
Since the crash is on
serialQueue.resume
, my hypothesis is that registering for notifications way later in our flow may affect the suspension of thecom.pusher.pushnotifications.sdk
dispatch queue done inpushNotifications.start
. If so, is there a potential workaround for this?Otherwise, I was hoping to know if you had any more information to provide that could be helpful around debugging this issue. Thank you!