Resorting to asking here since it seems that there's not a lot of documentation around debugging "Start" push notifications for Live Activities.
Basically, I've been trying to send a test "start" push notification from the Apple Push Notifications Console, and I am able to successfully send notifications where the console says "Received by APNS Server" and "Successfully delivered to the target device". However the problem is that the Live Activity never actually gets started.
I figured it could be an issue in the client code, and from my understanding, my didReceiveRemoteNotification
function should run after it gets received. However, no logs from that function get run.
To further narrow down the issue, I then investigated in the console.app
and under liveactivitiesd
I noticed 2 errors: Incoming message does not contain usable attributes
and Incoming message could not be parsed: <APSIncomingMessage: 0xXXXXXXXXX>
I know my ContentState matches the content state I send in the payload, so I'm not sure what else could be wrong for parsing.
Does anyone know what could be going on? Any help would be greatly appreciated!
For future onlookers, I fixed this issue by adding in the attributes-type
, attributes
and alert
fields as part of the aps
dictionary.
It seemed redundant at first since all of those were part of my initial content-state
field, but from this documentation, it seems this is necessary to specifically start a live activity