Open prabhatVinsol opened 2 years ago
Same here.
The macOS app works fine, but the push from iOS code fails with this error.
same here
Same here....
It seems that this issue is something to do with the legacy Binary Interface (gateway.push.apple.com) which was retired March 31st, 2021 (https://developer.apple.com/news/?id=c88acm2b). It includes the sandbox as well...
same...
same...
same.
+1
Same here... :( does anybody know an alternative that is still working?
Same here
Any luck?
Same here
I've seen there are some contributors listed in the repo let's see if someone knows how to fix it 🤔.
same
"Unable to connect: Socket connecting failed (-1)" means that you trying establish connection which cannot be established.
In my case i've created new push certificates, and push certificates named by new prefix like Apple Sandbox Push Services:
instead of Apple Development IOS Push Services:
.
So I need to use API which doesn't implemented in NWPusher.
You can interact with new API via curl requests from terminal as described in documentation here1 and here2
In my case code for terminal is:
DEVICE_TOKEN=enter_here_your_device_token; \
TOPIC=enter.here.bundleId.of.App; \
CERTIFICATE_FILE_NAME=path_to_CER_format_of_push_certificate; \
CERTIFICATE_KEY_FILE_NAME=path_to_PEM_format_of_push_certificate; \
APNS_HOST_NAME=api.sandbox.push.apple.com; \
curl -v \
--header "apns-topic: ${TOPIC}" \
--header "apns-push-type: alert" \
--cert "${CERTIFICATE_FILE_NAME}" --cert-type DER \
--key "${CERTIFICATE_KEY_FILE_NAME}" --key-type PEM \
--data '{"aps":{"alert":"test"}}' \
--http2 https://${APNS_HOST_NAME}/3/device/${DEVICE_TOKEN}
CERTIFICATE_KEY_FILE_NAME
mush be in PEM
format, it means to open this file you dont need enter the password. So if you have certificate in .p12
format you can translate it to PEM
format via (it requires password for this file):
openssl pkcs12 -in push_cert.p12 -out push_cert.pem -nodes -clcerts
CERTIFICATE_FILE_NAME
you can just download from https://developer.apple.com/account/resources/certificates/list
When selecting the certificate this error is coming "Unable to connect: Socket connecting failed (-1)"
Not able to find any help to figure out why this is happening and how to fix this.