I have a business requirement from a client to generate push notifications to Apple devices based on changes to Sharepoint 2010 server. I need to support these notifications in nearly real-time and access a server that is behind a VPN.
I am stumped.
You need to implement two things, an item event receiver that will detect the changes you are interested in and a APNS notification "service" to send the notification.
The standard way to react to changes in SharePoint is through event receivers. An event receiver implements a specific interface that provides callback functions for specific events.
There are multiple types of events all the way from the site collection level down to the item level. I assume that you are more interested in item level event receivers.
There are two broad types of events:
You should create an after event receiver that will create an APNS notification and send it.
To send the notification you can use a library like APNS-Sharp. The simplest solution would be to call the library directly from the event receiver. This may be OK if you are not concerned with notifications getting lost due to problems (e.g. connectivity).
A more robust and testable solution would be to put the notifications in a queue and create a separate project (eg. windows service, sharepoint service or even a simple scheduled task) that will read the queue and send the notifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With