I have determined the cause of this problem and solved it for myself. There were multiple issues with the format of the start live activity JSON payload.
Problem 1:
Apple's documentation (here) makes it look like content-state and attributes contain the same data structure which maps onto the ActivityAttributes.ContentState. In fact, attributes should be the immutable attributes of your ActivityAttributes struct, and content-state should be the nested .ContentState struct.
This documentation really needs to be corrected! I'm probably not the only one who wasted many hours because of it. Looking at the EmojiRangers source code it's clear that the attributes should contain a single nested hero object, but in the incorrect docs it contains the ContentState structure.
Problem 2:
The JSON that is acceptable to APNS is a subset of all JSON syntax. For example it wasn't working if a null was provided for a value even though my struct allows for it.
Another problem was dates in the JSON must be represented as unix epoch integers (in seconds) rather than ISO date strings.
It required wading through thousands of lines of device console logs across multiple subsystems and categories to figure this out.
Topic:
App & System Services
SubTopic:
Notifications
Tags: