Testing of Push Notification Using Windows Forms Application in C#

In this article, I would like to explain how to test Push Notification in Windows Forms applications. First create a new solution as in the following:

 windows form application 

Download the file and add an existing class library project called Project.MoonAPNS

library project 
 
 Add a new project as in the following:
 
Add a new project 
 

Add a new folder Debug and add .cer and .pfx, in other words aps_development.cer and ck.pfx files in this folder. These 2 files are generated using the SSL Converter.

 To learn more about this: Apple Push Notification Using ASP.Net.
 
Add a new form as in the following:
 
Add a new form
 
Drag and drop 2 Labels (Message, DeviceId), 2 TextBoxes and 2 Buttons controls from the ToolBox on the Form.
 
 controls from the ToolBox on the Form 
 
Add references of class library project Project.MoonAPNS.
 
class library project
 
Add code on the click event of the Send and Cancel buttons.
 
code 
 
 Press F6 to build the solution.
 
Press F5 or click on Start to run the application.
 
run the application
 
Enter message and DeviceId on which you want to test Push Notification.

Notification  

And you will get notification.