I'd like to be notified of certain events on my webserver with a push notification from my website to my iPhone. Is this somehow possible, or do I have to install/create a special App for this?
In order to use Push Notification it would have to be a native iPhone app on your phone. You might be able to set up some sort of email notification coming from your website and turn on push notifications for your mail client on your iPhone.
In regards to #gnuf's post (Sorry it wouldn't let me comment on your post) Your web server can act as the Provider of Push Notifications but will still require a native application on the phone to receive the notifications.
You can definitely send notifications triggered from a website: you just have to hook up the backend to do so. See this previous post for more information.
Related
I'm trying to send notifications to user through an app, but they don't show in any mobile device.
For example, the user makes an action that sends a notification o other user. If he is on a Computer browser he can see the notification, but in iOS/Android/Mobile Facebook the notification don't show up.
Can you guys help me?
Regrads,
Elkas
Are you talking about the Notifications API where you make a POST request to /{recipient_userid}/notifications?
If so, this is intended behaviour. From the docs:
Note: Only apps on Facebook.com can use the Notifications API. Also
these notifications are only surfaced on desktop version of
Facebook.com.
I would like to ask some suggestions to the experts who have faced similar problem as mine.
I am developing an iPhone application almost like a social networking application. This requires inviting friends to the application. The application is integrated with Facebook for login purpose. My question is that,
1) We can identify the Facebook friends who are using our application. We need to send notification (push notification) to iPhones of the friends who are using our application. Our backend is deployed in AWS. So that we have SNS and SQS for notification purpose. But it supports email and SMS notifications. I came to know from the web that there is Apple push notification services. Can we use apple push notification for this purpose? Which one is preferred here? SNS or apple push notification. Please advice. If you have any reference sites please give it to me.
To send APNS you need to have token of the device, so you can't send such notification just with the information about Facebook account. But if you are able to know that person is friend from Facebook and he uses your app, you can store some data, like token and facebook login of every user to send them APNS. But! Apple may reject it, because they hate when developers collect data that can identify a person.
APNS is nice for that situation, but risky. (Can anyone proof me wrong or right?)
Email is old-fashioned, but legal and easy to implement, i guess. Like, twitter sends push and email.
Also, you can use Facebook features (not so nice if you will integrate more social networks)
I think that you can use AWS SNS and APNS for what you want to do. You will need the pushTokens for the app/device that you are wanting to send push notifications as they act as the identifiers for the specific app/device to use as an endpoint.
You need to set up an SNS topic. Then you need to subscribe the devices (with the apps of interest) to the topic. Then you can publish to the topic (either programatically or via AWS Management console) and that message will propagate to all of the topics subscribed devices (termed endpoints).
AWS has a tutorial that walks you through this process: I have not tried it yet myself.
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html
Am developing an iPhone app. In my current iPhone app i want to integrate APNS that we want to send a messages to the user. I gathered information about APNS. But, still i have some doubts on the APNS.
How APN works that means how the push notifications showing to the user?
If our iPhone app get closed from Background, the Apple push notification will work or our app should be in run?
What will happen if we send a notification to the user but,if the user is in offline. The message will deliver to the user once the user gets online (Get network connection) or the message won't show to the user?
Push Notifications will be show the user if the user doesn't open the app in their iPhone?
Can anyone please guide me on these doubts? I hope on you friends. Please help me. Thanks in advance.
I think you did not follow Apple developer library instructions. I have doubts about your understanding of APNS and its working.
When you send the notification to user, and his cell is off or not connected to the internet, he/she will get message/notification when his/her cell will turn on or connect to the network.
And Push Notifications also work when your application is in backGround or user is not using the application.
Hope this information can clear your confusion, you should look in to the apple developer videos and SDK about push notifications.
Also this is SOreadytohelp.
You asked quite a few questions. I'll try to answer some of them as well as I know:
How APN works: You send a message to Apple's servers with the specific device ID. Apple will deliver that message to the iOS device. (You likely want a more specific answer, so please ask.)
If your app has been allowed background app notifications, then they will be delivered in the background. (The user can enable/disable this)
If the particular iOS device is not connected to the network, notifications will be queued. But, identical notifications will get discarded and only the most recent will get delivered. See: Quality of Service
Yes (basically the same answer for 2).
i have developed facebook chat app for iphone using XMPP.
But the app can not get push notification from Facebook. How can i get push notification from Facebook on my application?
Rather than polling continuously, you should try to use Facebook's realtime updates API where applicable.
https://developers.facebook.com/docs/reference/api/realtime/
It's only applicable for certain kinds of content, but if it covers what you need, it'll be more efficient than polling like prasanna suggests.
Basically Facebook will send a request to a URL on your server whenever an event happens. The handler for that URL should then be responsible for sending the push notifications.
You can't bring Facebook to send a push notification to your app, you would have to set up a web server that continuously polls Facebook for changes and then sends a push notification to the iOS device when it detects a change.
We're planning an app which, among other things, is supposed to integrate a facebook chat.
We're discussing about the push notifications for receiving messages while the app's in background. What comes to mind is a proxy server for the chat, that'd actually connect to the facebook chat, and the iPhone app would connect to the proxy.
Then, it's easy to have the proxy server act as a push notification server.
Is this the only way to go, or are we making this more complex than it needs to be?
Any input is appreciated. Thanks.
To do push notification (App is closed, user receive a message and an alert appear on the iPhone), that's the only way, because every app need an unique certificate to send push notifications. This mean that official Facebook servers can't push for third-party applications. You need a proxy that keep a connection open to FB and push alerts to Apple's Push Notification Server when needed.
Inside the app, instead, you can connect directly by opening a socket to Facebook's servers and use a Jabber library for ObjC. This allows another approach: Local Notifications. They're similar to Push, but they doesn't need a proxy server: it's the application running on user's device that keep an open connection (even when the app is in background) with Chat Server.
This is the documentation that covers both type of notification: Local and Push Notification Programming Guide
Facebook's chat system is a Jabber server, so I think you are making it more complex than you need to.