For IOS App, we have secure intranet and want to send push notification without APNS.
I have gone through may scenarios on here on site. I am not able to find any answer if using our network and server is it possible to send push notification without APNS.
For Android App I found that it is possible to bypass GCMS. what about to bypass APNS for IOS?
APNS can not work in closed networks ! You need internet to reach publicly hosted Apple Cloud Server. It's not possible to by-pass Apple servers for any Push Notification to be delivered to your app.
In Parse I know you can send push notification from one device to another, but since it is shutting down soon I have looked at a lot of push notification services. But I could not find one service which allows you to push to other users. i.e. Firebase, you send out notifications from the computer. Basically I need a service when a function is called in the code it goes to certain people automatically. Any service suggestions?
If you have an own server, connect it with FCM. Then create an API using PHP to receive message and forward it to another device. You may implement a system to store the FCM token of the devices in the server.
You have 2 options:
Create you own app server that will send a push notification to either APNS/GCM according to the user device type and device token id
Use push provider. I recommend you to use OneSignal because its 100% free, support in all devices and have an SDK to any client/server side technology so if you will use OneSignal you will not need any server in-between your app and the push server.
this is the onesignal home page: https://onesignal.com/
and this is the SDK docs page: https://documentation.onesignal.com/
BTW! if you want to can also continue to use parse services because they release their service as an open source which called parse-server
so you can take and deploy parse-server to any cloud platform that run NodeJS and then you can continue to work as usual
I want to send push notification from a iOS device to another iOS device without using backend server. Is it possible for an iOS device to act like a server and send push notification to APNs server?.
Thanks in advance.
Theoretically you can send Apple Push Notifications from a device directly to another device. All you need are the push certificate of the app, the device token of the device you are sending the notification to, and code that establishes a secure TLS connection to the APNS servers.
However, there are several practical problems that make the use of a server almost mandatory :
You need a single place where all the device tokens of all the devices that installed your app will be sent to and persisted in. The best such place would be a server. Without a server, how would device A send its device token to other devices that want to send it push notifications?
Apple require that you keep connections with the APNS server open for as long as possible and use the same connection for sending many notifications. If you open a connection to APNS server on your device, it will probably be short lived (since devices switch networks frequently, and don't stay connected to the internet all the time). Therefore, if you try to send many notifications frequently, and each time use a new connection to APNS, you will probably be banned (since Apple would treat this as DDoS attack).
If you store the push certificate in each device that installs your app (to allow it to send push notifications to other devices directly), aside from the security issue of storing the certificate in many places, you'll have to publish a new version of your app each time the push certificate expires (once a year), and push notifications would stop working for users who don't upgrade to the new version.
Try NWPusher.
It has an iOS framework for sending pushes and has an iOS demo application that sends push notifications from iOS to iOS.
You also need to consider Server costs (other than maintenance and development time if you code your own server).
By sending the push directly from the app device:
- you obtain a much better scalability (since you don't have to centralize everything on your server)
- you don't have to pay for server cost or other service's cost
You can use for iOS:
- https://github.com/noodlewerk/NWPusher Pusher
And for Android:
- Send push notification GCM by java
I am developing an IOS Framework with several functionalities, and I would like to add push notification services. I created my own push notification service using Easy APNS. I do not know how to deal with others apps when They integrated my SDK. I mean, I do not know, if they have to send me their distribution certificates, and I can add them in my push notifications service, or If I need to integrate something in their push notification servie.
I do not know how to deal with a Framework that will work with others app and push notifications.
Yes, If a app supports APNS then it has bundled with APNS enabled service(Push Notification service) certificate.
Assuming that your server is responsible for sending push notifications to all the applications using your SDK, you'll need to get from the developers of those app their push certificates.
I'm assuming that your SDK will handle the sending of the device token from an application to your server. You'll have to know in your server which device token belongs to which application.
For each application for which you wish to send push notifications, you'll have to maintain a separate connection to APNS using the certificate supplied by the developer of that application.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm working on a web app. How can I send push notifications to iOS users when there is new content?
To be more specific, in order for a web application to send push notifications to a mobile device, such as the iPhone, the mobile device must have registered to receive push notifications for a particular application. The registration for push notification is done through a native app and can only be performed through a native app. Once the native app is registered for push notification, it can send the authorization token to the server, which can be used in conjunction with the certificate used to provision the native client, to send the push notifications to the mobile device.
As specified in another answer, one option is to 'wrap' your web application in a native application. Meaning that you would create a native application that basically presents a UIWebView (for iPhone dev) to the user showing your web application. While this pretty much functions in the same manner as the native browser, you would be able to add the ability to register for push notifications using the native controls.
It would be beneficial to you to review the Apple's push notification document as it provides some pretty good information on how push messaging functions on the iPhone.
See these links provided by Peter Hosey:
https://support.apple.com/kb/HT201925
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html
While not yet supported on iOS (as of iOS 10), websites can send push notifications to Firefox and Chrome (Desktop/Android) with the Push API.
The Push API is used in conjunction with the older Web Notifications to display the message. The advantage is that the Push API allow the notification to be delivered even when the user is not surfing your website, because they are built upon Service Workers (scripts that are registered by the browser and can be executed in background at a later time even after your user has left your website).
The process of sending a notification involves the following:
a user visits your website (must be secured over HTTPS): you ask permission to display push notifications and you register a service worker (a script that will be executed when a push notification is received)
if the user has granted permission, you can read the device token (endpoint) which should be sent to the server and stored
now you can send notifications to the user: your server makes an HTTP POST request to the endpoint (which is an URL that contains the device token). The server which receives the request is owned by the browser manufacturer (e.g. Google, Mozilla): the browser is constantly connected to it and can read the incoming notifications.
when the user browser receives a notification executes the service worker, which is responsible for managing the event, retrieving the notification data from the server and displaying the notification to the user
The Push API is currently supported on desktop and Android by Chrome, Firefox and Opera.
You can also send push notifications to Apple / Safari desktop using APNs. The approach is similar, but with many complications (apple developer certificates, push packages, low-level TCP connection to APNs).
If you want to implement the push notifications by yourself start with these tutorials:
Push API: Push Notifications on the Open Web
Apple Push Notification system: Configuring Safari Push Notifications
If you are looking for a drop in solution I would suggest Pushpad, which is a service I have built.
Update (September 2017): Apple has started developing the service workers for WebKit (status). Since the service workers are a fundamental technology for web push, this is a big step forward.
No, only native iOS applications support push notifications.
UPDATE:
Mac OS X 10.9 & Safari 7 websites can now also send push notifications, but this still does not apply to iOS.
Read the Notification Programming Guide for Websites. Also check out WWDC 2013 Session 614.
You can use pushover if you don't want to create your own native app: https://pushover.net/
Google Chrome now supports the W3C standard for push notifications.
http://www.w3.org/TR/push-api/
ACTUALLY.. This is brand new mind you.. On the newest version of OS X (Mavericks) you CAN send push notifications from a webpage to the desktop. But according to the documentation, NOT iPhones:
Note: This document pertains to OS X only. Notifications for websites do not appear on iOS.
Currently Apple has plans to allow 2 kinds of push notifications:
OS X Website Push Notifications
and Local Notifications.
The obvious hurdle here is that this will not work on PCs, nor will it allow you to do android push notifications.
Furthermore, you actually can with versions as old as Snow Leapord, send push notifications from a website as long as said website is open and active. The new Mavericks OS will allow push notifications even if the site isnt opened, assuming you have already given permission to said site to send push notifications.
From the mouth of Apple:
In OS X v10.9 and later, you can dispatch OS X Website Push Notifications from your web server directly to OS X users by using the Apple Push Notification service (APNs). Not to be confused with local notifications, push notifications can reach your users regardless of whether your website or their web browser is open…
To integrate push notifications in your website, you first present an interface that allows the user to opt in to receive notifications. If the user consents, Safari contacts your website requesting its credentials in the form of a file called a push package. The push package also contains notification assets used throughout OS X and data used to communicate to a web service you configure. If the push package is valid, you receive a unique identifier for the user on the device known as a device token. The user receives the notification when you send the combination of this device token and your message, or payload, to APNs.
Upon receiving the notification, the user can click on it to open a webpage of your choosing in the user’s default browser.
Note: If you need a refresher on APNs, read the “Apple Push Notification Service” chapter in Local and Push Notification Programming Guide. Although the document is specific to iOS and OS X push notifications, paradigms of the push notification service still apply.
No, there is no way for an webapp to receive push notification. What you could do is to wrap your webapp into a native app which has push notifications.
The W3C started in 2010 a working group to implement notifications:
http://www.w3.org/2010/web-notifications/
This Working Group develops APIs that expose those mechanisms to Web Applications—so that Web developers creating, for example, Web-based e-mail clients and instant-messaging clients can more closely integrate their Web application behavior with the notification features of the operating systems of their end users.
Finally the result is like a bad joke as it works only if the specific website is open:
http://alxgbsn.co.uk/notify.js/
I think they missed to implement the possibility to add push urls so the browser is able to ask for notifications while its running in the background - and above all - if all tabs have been closed.
You can use HTML5 Websockets to introduce your own push messages. From Wikipedia:
"For the client side, WebSocket was to be implemented in Firefox 4,
Google Chrome 4, Opera 11, and Safari 5, as well as the mobile version
of Safari in iOS 4.2. Also the BlackBerry Browser in OS7 supports
WebSockets."
To do this, you need your own provider server to push the messages to the clients. If you want to use APN (Apple Push Notification) or C2DM (Cloud to Device Message), you must have a native application which must be downloaded through the online store.
Pushbullet is a great alternative for this.
However the user needs to have a Pushbullet account and the app installed (iOS, Android) or plugin installed (Chrome, Opera, Firefox and Windows).
You can use the API by creating a Pushbullet app, and connect your application's user to the Pushbullet user using oAuth2.
Using a library would make it much easier, for PHP I could recommend ivkos/Pushbullet-for-PHP.
Check out Xtify Web Push notifications. http://getreactor.xtify.com/ This tool allows you to push content onto a webpage and target visitors as well as trigger messages based on browser DOM events. It's designed specifically with mobile in mind.