Skip to content
Snippets Groups Projects
Commit 5504b23f authored by Zandor Smith's avatar Zandor Smith :computer:
Browse files

Adjust documentation and exception message.

parent 022d940b
No related branches found
No related tags found
No related merge requests found
Pipeline #15689 passed
......@@ -82,8 +82,9 @@ class APNS {
/**
* Setter for setting the path to the root certificate .pem file.
* You can use this to specify a root certificate if it's not whitelisted on the system.
* The HTTP/2 APNs provider API root certificate is available here: https://developer.apple.com/library/archive/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG31
* You can use this to specify a root certificate if it's not installed on the system already.
* The HTTP/2 APNs provider API root certificate is available here:
* https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server
* Note: Might require an absolute path.
* @param $rootCertificatePath string|null
*/
......@@ -143,7 +144,7 @@ class APNS {
if ($httpcode == 400 || $httpcode == 403 || $httpcode == 404 || $httpcode == 405 || $httpcode == 413 || $httpcode == 429 || $httpcode == 500 || $httpcode == 503) {
$output = json_decode($response, true);
throw new APNSException("APNs error: " . $output['reason'] . PHP_EOL . "See the following link for instructions: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns");
throw new APNSException("APNs error: " . $output['reason'] . " (HTTP $httpcode)" . PHP_EOL . "See the following link for instructions: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/handling_notification_responses_from_apns");
} else if ($httpcode == 410) {
throw new APNSDeviceTokenInactive("The device token is inactive. It can be removed from the database until registered again. (" . $token->getToken() . ")");
} else if ($httpcode != 200) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment