I propose to specify an array shape for the parameter of setData() method in order to help IDEs to analyse the code and to highlight possible errors preemptively. This will save developers’ time (I personally spent on this issue a couple of investigation hours).
FCM message will not be received if array shape is different from
array<string, string>
(string keys and string values).For example, this code won’t work:
I propose to specify an array shape for the parameter of
setData()
method in order to help IDEs to analyse the code and to highlight possible errors preemptively. This will save developers’ time (I personally spent on this issue a couple of investigation hours).