admin管理员组文章数量:1122832
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!
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!
Share Improve this question asked Dec 21, 2024 at 0:12 papers1010papers1010 451 gold badge1 silver badge11 bronze badges 2 |1 Answer
Reset to default 0For 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
本文标签:
版权声明:本文标题:ios - Sending "Start" Live Activity Notification from Apple Push Notifications Console successfully received b 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736397785a1944314.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Payload Format
: The push notification payload should contain an aps dictionary with the usual fields (e.g.,alert
,content-available
, etc.), but it should also include a Live Activity-specific key called activity that contains the type and the attributes required for thLive Activity
. – K.pen Commented Dec 31, 2024 at 7:36