GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Net::APNs::Extended(3) User Contributed Perl Documentation Net::APNs::Extended(3)

Net::APNs::Extended - Client library for APNs that support the extended format.

  use Net::APNs::Extended;

  my $apns = Net::APNs::Extended->new(
      is_sandbox => 1,
      cert_file  => 'apns.pem',
  );

  # send notification to APNs
  $apns->send($device_token, {
      aps => {
          alert => "Hello, APNs!",
          badge => 1,
          sound => "default",
      },
      foo => [qw/bar baz/],
  });

  # if you want to handle the error
  if (my $error = $apns->retrieve_error) {
      die Dumper $error;
  }

Net::APNs::Extended is client library for APNs. The client is support the extended format.

Create a new instance of "Net::APNs::Extended".

Supported arguments are:

is_sandbox : Bool
Default: 1
cert_file : Str
cert : Str
Required.

Sets certificate. You can not specify both "cert" and "cert_file".

key_file : Str
key : Str
Sets private key. You can not specify both "key" and "key_file".
password : Str
Sets private key password.
read_timeout : Num
Sets read timeout.
write_timeout : Num
Sets write timeout.

Send notification for APNs.

  $apns->send($device_token, {
      apns => {
          alert => "Hello, APNs!",
          badge => 1,
          sound => "default",
      },
      foo => [qw/bar baz/],
  });

Send notification for each data. The data chunk is same as "send()" arguments.

Gets error data from APNs. If there is no error will not return anything.

  if (my $error = $apns->retrieve_error) {
      die Dumper $error;
  }

xaicron <xaicron {@} cpan.org>

Copyright 2012 - xaicron

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.