Skip to content

QinRay/Java-Python-server-for-APNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java & Python server for APNS

English 简体中文

what is this?

This is a simple Java or Python server for puhing remote notifications to iOS devices using apple push notification server(APNS).

Before you start

prepare the following:

  • A valid APNS certificate
  • A valid APNS key
  • A valid APNS topic (not necessary)
  • A valid APNS device token
  • A valid Apple Developer Team ID

more information about the APNS can be found here

Config

  1. Clone the project git clone https://github.com/TLSMars/Java-Python-server-for-APNS.git

Python

  • Install the required packages
    cd Python
    pip install -r  requirements.txt
  • change the AuthKey.p8 file to your key file
  • open config.json and change the following variables:
    • key_id
    • team_id
    • APNS_TOPIC
    • device_token

Java

  • open Java/src/com/apple.properties file and change the following variables:
    • key_id
    • team_id
    • APNS_TOPIC
  • change the Java/src/com/AuthKey.p8 file to your key file
  • open Java/src/com/Main.java and change the following variables:
    • deviceToken

Run

! Important: Requests to APNS must be made using a secure connection (HTTPS over HTTP/2). Therefore, if any issues arise, they may be attributed to the usage of HTTP/2.

Python

cd Python
python sendNotificationToAPNS.py

Java

I am sorry, I am not familiar with Java, but you can run it using any Java IDE. I can run it using vscode If you know how to run it using the terminal, please let me know.

License

MIT

Please Star

if you find it useful, please give me a Star ⭐️

Others

Push Notification Console

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published