we are trying to implement silent push notifications in our react native app. Unfornately we get some strange trouble with iOS. After all we could find 3 cases, where push notifications arent received at our test iPhones properly.
We have also tested our new feature on Android but apparently these issues only occur on iOS. We found the same question on stackoverflow (iOS Silent Push Notification not delivered after device reboot) but the answers were not quite helpful.
In our first case we discovered that the delivery of Push Notifications to multiple iPhones doesnt seem reliable. We tested this problem with 2 phones (iOS 15 + iOS 16), where one of them doesnt receive messages correctly. On the one hand the messages were not displayed after starting our app and on the other hand the notifications didnt show up at all. We couldnt find any reasons for that and we are pretty sure that React Native is not the problem here. We could only find this strange log:
"com.apple.pushLaunch.de.example.app:37D069:[{name: ApplicationPolicy, policyWeight: 50.000,
response: {Decision: Absolutely Must Not Proceed, Score: 0.00,
Rationale: [{[pushDisallowed]: Required:0.00, Observed:1.00},]}}
{name: BootTimePolicy, policyWeight: 0.010, response:
{Decision: Must Not Proceed, Score: 0.00,
Rationale: [{[Minimum seconds after boot]: Required:120.00, Observed:68.56},]}}
{name: , policyWeight: 1.000, response: {Decision: Must Not Proceed, Score: 0.00,
Rationale: [{timeSinceThunderingHerdTriggerEvent < 300}]}}],
FinalDecision: Absolutely Must Not Proceed}"
Our second problem occur when we send a push notification to an inactive phone. After sending the message and booting our phone, we are not able to receive the message at all except the user start the app. This problem always occur when the phone was off.
The third problem is quite similar to the second one. First we reboot our test device and send after that a push notification via APNS. The user will not receive any messages, if the app is not started. We could find this log:
"Daemon Canceling Activities: {(com.apple.pushLaunch.de.example.app:E7F648)}"
"CANCELED:com.apple.pushLaunch.de.example.app:E7F648 at priority 5 <private>!"
"com.apple.pushLaunch.de.example.app:71F21A:[
{name: ApplicationPolicy, policyWeight: 50.000, response:
{Decision: Absolutely Must Not Proceed, Score: 0.00,
Rationale: [{[pushDisallowed]: Required:0.00, Observed:1.00},]}}
{name: ThunderingHerdPolicy, policyWeight: 1.000, response:
{Decision: Must Not Proceed, Score: 0.00,
Rationale: [{timeSinceThunderingHerdTriggerEvent < 300}]}}],
FinalDecision: Absolutely Must Not Proceed}"
Our payload has only the content-availability header set to true. There is no other header specified in the payload. The response of the Apns is always 200.
All these problems seems to be an hotfix but we could not find any useful informations by apple. Any ideas would be very helpful.
For Android and iOS we use the react native libraries: