zendframework / ZendService_Apple_Apns

BSD 3-Clause "New" or "Revised" License
49 stars 70 forks source link

'content-available' key within 'aps' dictionary #22

Closed Illizian closed 9 years ago

Illizian commented 9 years ago

I am using this library via the laravel-push-notification package.

I'm having difficulty sending a push notification to an iOS device containing the key 'content-available' within the aps dictionary, as documented on Table 3-1 here.

It looks like the cause is in the ZendService\Apple\Apns\Message\Alert class.

Is it just a case of adding the following:

protected $contentAvailable;

public function setContentAvailable($value) {
    $this->contentAvailable = $value;
}

public function getContentAvailable() {
    return $this->contentAvailable;
}

If so, happy to submit a PR for this.

Cheers

Ocramius commented 9 years ago

@Illizian give it a try and provide a test case, I'd say.

Illizian commented 9 years ago

PR merged #23