Sha256: 75c684f675ed945becf67562ff607734d68abcbe6bb0973afbb4d2f1db5ea3df

Contents?: true

Size: 1.38 KB

Versions: 10

Compression:

Stored size: 1.38 KB

Contents

====================================
Getting Started
====================================
For Rails start the generator: kw_apn
This will copy the configuration example into your project.

If you not working with Rails you need to specify either Rails.root and Rails.env or RACK_ROOT and RACK_ENV for the gem to work.

Manual:
create the File
<project_root>/config/kw_apn.yml

structure of the config file should look like this:


    environment: 
      cert_file: path to ssl certificate file
      push_host: 'gateway.sandbox.push.apple.com' or 'gateway.push.apple.com' for live
      push_port: 2195
      feedback_host: 'feedback.sandbox.push.apple.com' or 'feedback.push.apple.com' for live
      feedback_port: 2196 
  

====================================
Example
====================================

  users = MyAPNUsers.all
  n = []
  payload = {:aps => {:alert => "Something very important for everyone to read", :sound => 'annoying_beep'}}
  
  users.each do |u|
    n << KwAPN::Notification.create(u.token, payload, 0)
  end
  
  status, ret = KwAPN::Sender.push(n, 'TestSession')
  
  if status == :ok
    ret.each do |token|
      MyAPNUsers.delete_all('token'=>token)
    end
  end
  

====================================
Copyright
====================================

Distributed under the MIT License.
Based in part on Apns4r by Leonid Ponomarev (http://rdoc.info/projects/thegeekbird/Apns4r)
  

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kw_apn-0.4.beta.8 README.rdoc
kw_apn-0.4.beta.7 README.rdoc
kw_apn-0.4.beta.6 README.rdoc
kw_apn-0.4.beta.4 README.rdoc
kw_apn-0.4.beta.3 README.rdoc
kw_apn-0.4.beta.2 README.rdoc
kw_apn-0.4.beta.1 README.rdoc
kw_apn-0.3.1 README.rdoc
kw_apn-0.3 README.rdoc
kw_apn-0.2 README.rdoc