-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,51 @@ | ||
[Quick start](https://github.com/teaey/apns4j/wiki) | ||
--- | ||
|
||
``` | ||
<dependency> | ||
<groupId>cn.teaey.apns4j</groupId> | ||
<artifactId>apns4j</artifactId> | ||
<version>1.1.0</version> | ||
</dependency> | ||
Apple Push Notification Service Implement with Java | ||
--- | ||
//Step 1 | ||
ApnsChannelFactory apnsChannelFactory = Apns4j.newChannelFactoryBuilder() | ||
.keyStoreMeta("${path to your keystore}") | ||
.keyStormPwd("${keystore password}") | ||
.build(); | ||
[APNS](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html) | ||
//Setp 2 | ||
ApnsChannel apnsChannel = apnsChannelFactory.newChannel(); | ||
[Quick start](https://github.com/teaey/apns4j/wiki) | ||
//Step 3 create & init notify payload | ||
ApnsPayload apnsPayload = Apns4j.newPayload() | ||
.alertActionLocKey("FixMe") | ||
.alertTitle("Title") | ||
.alertBody("Pushed by apns4j") | ||
.sound("default"); | ||
//Step 4 send via channel | ||
apnsChannel.send(TestConts.deviceToken, 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. | ||
``` | ||
|
||
|
||
|