GithubHelp home page GithubHelp logo

ddapns's Introduction

============
DDAPNS v.1.0
============

Use this script to manage APNS (Apple Push Notification Service).


REQUIREMENT
===========
- PHP 5.2.x with SQLite support
- .pem files for APNS (go to apple provisioning portal)
- server with port 2195 open


INSTALLATION
============

1. Edit config.php. 
2. If necessary provide both PRODUCTION and DEVELOPMENT .pem file.
3. Set sandbox_mode = true for DEVELOPMENT and set false for PRODUCTION.
4. Set apns_access_key to any string so only you able to use this script.

<?php  
  $config['sandbox_mode'] = true;
  $config['apns_pem_file_sandbox'] = "aps_acsdemo_dev.pem";
  $config['apns_pem_file_production'] = "aps_acsdemo_prod.pem";
  $config['apns_access_key'] = "123456";
?>


TESTING
=======

1) Adding new device token. Your iOS app need to send data containing device token.

Assuming you install in localhost with IP address 192.168.1.144 under ddapns folder. When testing on localhost, always use IP because your device need to find you mac.

Open browser and locate to: 

http://192.168.1.144/ddapns/subscribe.php?key=123456&token=fc5ef26f9811e83d93c2b3bd0403907d7ba97d287f9b3889074838e5bcfec89b

Parameters:
- key is apns_access_key
- token is device token


2) View device tokens. You can use it to see all device tokens

Open browser and locate to: 
http://192.168.1.144/ddapns/viewtokens.php?key=123456

Parameters:
- key is apns_access_key


3) Remove all tokens. You can use it to remove all tokens

http://192.168.1.144/ddapns/removetokens.php?key=123456

Parameters:
- key is apns_access_key


4) Push a message to all devices.

http://192.168.1.144/ddapns/push.php?key=123456&msg=this%20is%20test

Parameters:
- key is apns_access_key
- msg is the message


5) Checking port 2195 is open

http://192.168.1.144/ddapns/checkport.php

ddapns's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.