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


Manual Reference Pages  -  NET::APNS::EXTENDED (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  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;
  }



DESCRIPTION

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

METHODS

    new(%args)

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.

CW$apns->send($device_token, CW$payload [, CW$extra ])

Send notification for APNs.



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



CW$apns->send_multi([ [ CW$device_token, CW$payload [, CW$extra ] ], [ ... ] ... ])

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

CW$apns->retrieve_error()

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



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



AUTHOR

xaicron <xaicron {@} cpan.org>

COPYRIGHT

Copyright 2012 - xaicron

LICENSE

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

SEE ALSO

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


perl v5.20.3 NET::APNS::EXTENDED (3) 2016-04-04

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