Closed calvinckho closed 6 years ago
Hello @calvinckho, thank you for your comment and PR!
Actually node-apn, does this conversion. See https://github.com/node-apn/node-apn/blob/aef8ec16e7449076f405982709cf72bdb3aa0b8a/lib/notification/apsProperties.js#L83
Do you experience issues with this? Because for me it works by setting the value to true
Great! Glad to know this. Maybe you can clarify it in the documentation? It is not very clear whether we should use 'true' or 1 for contentAvailable. Thanks!
contentAvailable: true, // gcm for android
delayWhileIdle: true, // gcm for android
restrictedPackageName: '', // gcm for android
...
action: '', // apn and gcm for ios
category: '', // apn and gcm for ios
contentAvailable: '', // apn and gcm for ios
Hi @calvinckho . What do you think about https://github.com/appfeel/node-pushnotifications/pull/80/? Is it sufficiently clear in this form?
In the JSON file, property contentAvailable for GCM and APN conflicts with each other. If you set contentAvailable to true, it works okay for GCM (which requires true) but does not work for APN (which requires 1).