Closed bjrnblm closed 4 years ago
Thanks @bjrnblm
@bjrnblm singleton problem has fixed by this commit: https://github.com/kawankoding/laravel-fcm/commit/07f901ce28794aca0c8386ed6532043c7b0ca2f8 lib version v0.2.0 https://github.com/kawankoding/laravel-fcm/releases/tag/0.2.0 :D
I am using this package to send different payloads to Android devices and iOS devices in one request. This gave me some problems, because this package reuses the
Fcm
class via a singleton.iOS:
Android:
If i send an iOS notification first the
Fcm
class has a$notification
property which gives problems inside the Android app. However I am not able to reset / remove this property from theFcm
class anymore.Failed solutions: An empty array in the notification method gives a
null
response from Firebase:A
null
in notification method is not possible because of typehinting in the current packageNote in docs: That is why I added a note to the docs with a workaround by using the
Fcm
class directly instead the the facade or helper.Would be nice to in the future to be able to reset class properties in the
Fcm
class by updating them withnull
. I could make PR for that too if you are interested.