# apns4j **Repository Path**: teaey/apns4j ## Basic Information - **Project Name**: apns4j - **Description**: 苹果推送服务的java实现 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://github.com/teaey/apns4j - **GVP Project**: No ## Statistics - **Stars**: 19 - **Forks**: 2 - **Created**: 2013-12-26 - **Last Updated**: 2024-05-29 ## Categories & Tags **Categories**: message-server **Tags**: None ## README # Apns4j [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) [![Build Status](https://travis-ci.org/teaey/apns4j.svg?branch=master)](https://travis-ci.org/teaey/apns4j) ### Quick start ``` cn.teaey.apns4j apns4j 1.1.2 ``` ``` //Step 1 ApnsChannelFactory apnsChannelFactory = Apns4j.newChannelFactoryBuilder() .keyStoreMeta("${path to your keystore}") .keyStorePwd("${keystore password}") .build(); //Setp 2 ApnsChannel apnsChannel = apnsChannelFactory.newChannel(); //Step 3 create & init notify payload ApnsPayload apnsPayload = Apns4j.newPayload() .alertTitle("Title") .alertBody("Pushed by apns4j") .sound("default"); //Step 4 send via channel apnsChannel.send("${target device token}", apnsPayload); //Step 5 in the end, apnsChannel can be Recycle and Reuse apnsChannel.close(); ``` #### Version Control ``` This project uses Semantic Versioning. Version format is X.Y.Z: X: New program version. Y: New feature or huge bug fix patch. Z: Minor fix or patch. ``` #### 捐赠 ![donate](https://cloud.githubusercontent.com/assets/3061252/22192809/1806d084-e172-11e6-801b-47271fc6afd5.jpeg)