A web application acts as a backend to process request coming from the iPhone. To send messages to iPhone from web application while processing a request(e.g., for payment), I want to send messages to iPhone when something interesting happens on the server or else if everything is successful, sending them transaction details. Which one is better to use PushSharp or SignalR? Does they both serve the same purpose? Either way, enlighten me on this topic. Its confusing to me.
-
You need to provide some information on what you are trying to achieve? Are you sending a message to an ios app you have written? or simply viewing a webpage in safari on an ios device? – BenjaminPaul Mar 12 '14 at 11:34
-
The first word I mentioned is 'To send a messsage to iPhone'. Anyway I made an edit. Hope its clear now. – user Mar 12 '14 at 11:44
-
I can read your question perfectly... but it does not make any sense... what kind of request? Is your app a website or a native IOS application? are you simply trying to update a webpage when something happens on your server or are you trying to send a PUSH notification to an actual app... you dont seem to know the difference between a notification from signalR and a push notification. – BenjaminPaul Mar 12 '14 at 11:47
-
I'm from dotnet background. I know nothing about iOS and how it works. Its an app. I know SignalR provide real time communication between server and client. But i dont know what is push notification is. All I'm asking is difference between them. – user Mar 12 '14 at 11:53
2 Answers
SignalR is a great way to send real time information to a web client, essentially having server-side code push information to the client and call client-side code (i.e. javascript) in realtime.
PushSharp is a great way to send push notifications to native mobile apps. For iOS, this means using Apple's infrastructure. It also means that the message will be shown as a notification in the iPhone and not just inside the browser.
Essentially, if the iPhone request you mention is coming from a native app, try PushSharp. If it's a web app running in a browser, use SignalR.

- 4,310
- 2
- 28
- 40
-
Is there a way to use Pushsharp to open a url insteead of your app? – user230910 Jul 29 '15 at 09:45
-
I don't know, but even if there isn't a way to directly do this, you could either include the URL as part of the notification content or have it trigger a view that shows a link within your application which will in turn load the URL in the browser – elolos Jan 06 '16 at 12:35
PushSharp appears to leverage the native messaging for each platform. Azure Notification Hubs provide native messaging similar to what PushSharp appears to do. The native messaging platforms scale out very well, but do not give you direct access between client/server code, and messages can be delayed in some cases up to minutes. Messaging like this works really well when you want to send messages to millions of devices. Example: all users who want an alert when their favorite sports team wins a game - not time sensitive to the minute.
If you want your push message to be strictly between your server-side code and your client-side code, SignalR can achieve that. SignalR also has a .Net implementation, so it isn't just for javascript/web pages. SignalR is will leverage approaches like web sockets / long polling / etc. If you are sending a response to tell your client that a query has finished, or that a message was received, and it doesn't help to have that message arrive minutes later... SignalR may be a better approach.

- 21
- 2