Silent Push in iOS13

200 Views Asked by At

I gone through the apple doc, they made some changes related to silent push. We have to add apns-push-type in headers and also apns-priority should mention 5. I made these changes, normal pushes working fine but in silent case i am not receiving any push I mean didReceiveRemoteNotification this method doesn't get called. Also i tried without apns-priority in headers but no use.

    let headers = {
                    'apns-push-type': 'background',
                    'apns-priority': 5
                };
let sock = tls.connect(2195, server, {key: config['apkey'],cert: config['acrt'],headers}, function () {
});

I am using tls connection at server side, above code is server side while creating socket connection. Please let me know what I am doing wrong.

1

There are 1 best solutions below

0
Naveen Reddy On

There is no option for headers in tls, so i replaced the code with http2. Its working fine.