I am completely New to Apple Push Notifications service. I am trying to implement it for my applications. I searched well in google as well as in stackoverflow, but not satisfied. I am trying to implement provider in c#. I have tried MoonAPNs too.
Can anybody here suggest me good step by step tutorial on it that is very simple. I have already obtained ios developer and apn certificates as well as p12 key. I need help then on.
Thanks in advance.
Here is the infrastructure and process I am using:
Brief Overview:
I use PushSharp for communicating with the APNS servers. I have a SQL Server backend DB setup to handle all the subscriptions and notifications that get sent. I also have a virtual server (several actually) that all have the .p12 certs copied to them. These servers have process that checks the table for any push notifications that need to go out and then pass the dataset along to the PushSharp process.
Detailed Specs:
Table 1 – APNS_Subscriptions
Table 2 – APNS_PushNotifications
I add subscriptions via this SP (this is called through a webservice via each iPhone app that implements APNS:
Push Notifications are added via this SP:
This is called from several different places in several different DB’s this way:
EXECUTE [ins_APNS_PushNote]
@NetworkID
,@iOSApplicationName
,@AlertMessage
,@SoundFile
,@RequestedBy
The SP that retrieves these APNS requests for the virtual server (PushSharp):
Now for the changes I made to the PushSharp app. Really just boils down to two methods:
static void Main(string[] args)
{
checkForPushRequest();
}
I added a Console project to the PushSharp solution and deployed the Console to the APNS server. This console app is fired based on scheduled task to run every minute.
If you have more questions, let me know. I have been using this process for the last year in an enterprise environment and have had no issues. Works flawlessly.