pushd
pushd copied to clipboard
Multiple APNS certificates
I have multiple iPhone apps that will use my PUSHd. It appears that I need an individual APNs certificate from Apple for each of these apps. Is there a way for the coffee.settings to be able to handle multiple APNs certificates?
on my server, it's works .I just create multiple instance on pushd(don't forget to change the port or you'll have conflict ) .if you have some trouble you can send me an email via [email protected]
Thanks. I am aware of that possibility, but I may have thousands of individual apps.
i didn't find yet another solution .If i find it i'll share to you :) Do the same if you can :)
I may have found my answer: In the settings.coffee file, I can add another exports['apns1'] and change the cert: and key: for the new app. Then, in the app itself, it can reference 'apns1' instead of 'apns' when communicating with the pushd server. I will try this at home tonight...
i'll check tomorrow also .Keep me up to date and i do the same ;)
i hope that they will be no trouble with the redis database
Why I think it will work: We can have 'apns' and 'apns-dev' in settings.coffee. There is nothing magical in those names.
Why do you think that there might be trouble in the redis database?
yes you're right never mind
I renamed my main apns entry in settings.coffee, and my main app still works. Tomorrow I will get the new certificate and new app running, modifying settings.coffee to take the new certificate for the new app.
I modified settings.coffee with the new information, and the new certificate for the new app, and it worked as expected!
I am also running multiple instances. But just wondering how can you have multiple exports [apns] & [apns1] and refer to them from the app?
If my memories are good, it's when you try to register and you said it's apns1 or apns
You mean for proto="apns1" or proto="apns2" when you subscribe? Thanks.
long time i didn't configure it but i think yes ^^
You can export another setting in coffe file like this:
.
.
.
exports['apns'] =
enabled: yes
class: require('./lib/pushservices/apns').PushServiceAPNS
# Convert cert.cer and key.p12 using:
# $ openssl x509 -in cert.cer -inform DER -outform PEM -out apns-cert.pem
# $ openssl pkcs12 -in key.p12 -out apns-key.pem -nodes
cert: 'apns-cert.pem'
key: 'apns-key.pem'
cacheLength: 100
# Uncomment to set the default value for parameter.
# This setting not overrides the value for the parameter that is set in the payload fot event request.
# category: 'show'
# contentAvailable: true
# Selects data keys which are allowed to be sent with the notification
# Keep in mind that APNS limits notification payload size to 256 bytes
payloadFilter: ['messageFrom']
# uncommant for dev env
gateway: 'gateway.sandbox.push.apple.com'
address: 'feedback.sandbox.push.apple.com'
exports['apns-alt'] =
enabled: yes
class: require('./lib/pushservices/apns').PushServiceAPNS
# Convert cert.cer and key.p12 using:
# $ openssl x509 -in cert.cer -inform DER -outform PEM -out apns-cert.pem
# $ openssl pkcs12 -in key.p12 -out apns-key.pem -nodes
cert: 'apns-cert-alt.pem'
key: 'apns-key-alt.pem'
cacheLength: 100
# Uncomment to set the default value for parameter.
# This setting not overrides the value for the parameter that is set in the payload fot event request.
# category: 'show'
# contentAvailable: true
# Selects data keys which are allowed to be sent with the notification
# Keep in mind that APNS limits notification payload size to 256 bytes
payloadFilter: ['messageFrom']
# uncommant for dev env
gateway: 'gateway.sandbox.push.apple.com'
address: 'feedback.sandbox.push.apple.com'
.
.
.
just don't forget to change proto key in /subscribers request according the name you decided... probably a good practice is to use your app identifier.