pusher / push-notifications-swift

Swift SDK for the Pusher Beams product:
https://www.pusher.com/beams
MIT License
34 stars 24 forks source link

Crash on addDeviceInterest #180

Closed paul-homie closed 1 year ago

paul-homie commented 2 years ago

We are getting a decent amount of crashes on calling addDeviceInterest.

I see in PushNotificationsStatic on line 196 you have this code: fatalError("PushNotifications.shared.start must have been called first")

Why must you use fatalError? It looks like there is an edge case where we accidentally call addDeviceInterest without calling start. Couldn't this just be ignored if start isn't called?

benjamin-tang-pusher commented 2 years ago

Could you catch this edge case before you call addDeviceInterest? For example use a boolean for if you’ve called start (similar to the private var startHasBeenCalledThisSession = false in Pusher).

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thankyou.