adobkin / libcapn

A simple C Library for interact with the Apple Push Notification Service (APNs)
MIT License
100 stars 35 forks source link

Adding "content-available" property #24

Open dannygunawan opened 8 years ago

dannygunawan commented 8 years ago

Hi, is it possible to add content-available property inside aps json? I need this for background notification with phonegap-plugin-push.

{
    "aps": {
        "data": "Test silent background push",
        "moredata": "Do more stuff",
        "content-available": 1
    }
}

Thank you.

adobkin commented 8 years ago

Hi,

Yes, just call apn_payload_set_content_available(payload, 1)

dannygunawan commented 8 years ago

oops.. I posted issue on the wrong repository. Actually I wanted to ask about this feature in php-apn.

I could not find apn_payload_set_content_available() function from php-apn dll library downloaded from : http://windows.php.net/downloads/pecl/releases/apn/1.0.3/php_apn-1.0.3-5.4-nts-vc9-x86.zip