gorush
gorush copied to clipboard
let apns support multi-cert
I modified sort of the code, let the ios could support multiple certifications. The usage was same as the andriod platform. Make a request as followed
{
"notifications": [
{
"tokens": ["token_a", "token_b"],
"platform": 1,
"message": "Hello World iOS!",
"apns_client": "cert1",
}
]
}
key "apns_client" will find the source from config.yaml. Certificaton can set in config.yaml as followed
ios:
key_map:
cert1: "key.pem"
cert2: "cert2.pem"
cert3: "cert3.pem"
key_password:
cert1: ""
cert2: ""
cert3: ""
#99
Hi! What's up with this change?
Yeah, it would be good to have this change. The alternative is to setup 2 or more GoRush instances.
Totally agreed to support multiple certs and multiple API keys.
I would suggest
ios:
keys:
- cert: "key.pem"
password: ""
- cert: "cert2.pem"
password: ""
- cert: "cert3.pem"
password: ""
intead of
ios:
key_map:
cert1: "key.pem"
cert2: "cert2.pem"
cert3: "cert3.pem"
key_password:
cert1: ""
cert2: ""
cert3: ""
@appleboy Hey there Is there any chance this will be merged or any other way of supporting multiple apns certificated will be implemented?