I’ve an app which I’ve enabled VoIP entitlement and carried out all of the CallKit and PushKit registries and delegates.
I can efficiently get a VoIP token.
I can efficiently ship VoIP push notifications (and obtain them through the PushKit delegate operate) after which report an incoming name through CallKit, however solely whereas my app is within the foreground.
I’ve checked the entitlement in XCode and the Information.plist straight, and so they each (as anticipated) present voip as a background mode.
The VoIP notification is being despatched through AWS SNS and every part works whereas the app is within the foreground. I can not perceive why the app just isn’t waking up whereas within the background.
That is the VoIP notification despatched through SNS:
aps: {
alert: "Intercom name",
"content-available": 1
}
SNS Message Attributes:
'AWS.SNS.MOBILE.APNS.TOPIC': {
DataType: 'String',
StringValue: `${bundleId}`
},
'AWS.SNS.MOBILE.APNS.PUSH_TYPE': {
DataType: 'String',
StringValue: 'voip'
},
'AWS.SNS.MOBILE.APNS_VOIP.TTL': {
DataType: 'String',
StringValue: '0'
},
'AWS.SNS.MOBILE.APNS_VOIP_SANDBOX.TTL': {
DataType: 'String',
StringValue: '0'
},
'AWS.SNS.MOBILE.APNS.PRIORITY': {
DataType: 'String',
StringValue: '10'
}
As I say,
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for sort: PKPushType) async
works accurately when within the foreground. I can not see any motive why it will not work from the background.
I’m additionally receiving regular distant notifications accurately foreground and background.