Link iOS push notification to PWA/website - ios

We are in the process of developing a PWA that should send out notifications that are visible outside the application and even when the application is closed. In other words, like when a native app would send out notifications.
However, at the moment this is only possible on Android devices, on iOS this is not yet possible.
So we are looking for ways to work around this problem.
One theory is to create a very small native app for iOS with the soul purpose to send out notifications.
Our PWA would create the notification and make it available via an API call.
The native app would do a request every x seconds to retrieve the notifications and display them on the phone.
The part where we are a bit in the dark about is if it is possible to make the notification that is displayed link to the PWA instead of the native app?

Yes maybe with OS X Push Notifications for Websites: https://developer.apple.com/notifications/safari-push-notifications/

Related

Make an ios notifications from ios website

I want to build html5 application using some frontend framework like angular or vue.js and then I want to make a mobile app from it. I don't need this mobile app to be native, so that's okay.
Then I want to put it into webview to make a mobile app from it.
I know this is possible with android. Is this possible with ios?
And will it possible to send push notifications?
ps: I don't want to use react native or cordova cause it will be much more difficult and we will run over the budget for this mvp
While technically possible, if you're planning on trying to put it on the app store, you're likely going to run afoul of the app store guidelines and will likely get rejected:
4.2 Minimum Functionality
Your app should include features, content, and UI that elevate it
beyond a repackaged website.
https://developer.apple.com/app-store/review/guidelines/
Technically, all you need for a push notification is to get the mobile id (the one they register to APNS) then send a notification package to apple some way (normally a remote server) to register a new notification. My question is aside from notifications, why not just build a different sort of app like a progressive web app?

Push notifications progressive web app on iOS

I need to develop a progressive web app with push notifications integrated. Searching on the web I have found diverse opinions about this subject.
If I have understood correctly, for now, we cannot have push notifications in safari for mobile (but only for Desktop). Is it right?
Do you have any suggestions to obtain the same result (I am not an iOS expert)? I was wondering that maybe developing a native app only for push notifications purposes could be a good choice until push notification will be ready also for safari mobile.
P.S. I am developing the PWA using Angular 2.
Thank you for the support.
Unfortunately, based this post and also this the latest iOS version(13.3) still doesn't support some features of progressive web app:
Web Push Notification
Background Sync
Page Lifecycle
Service Workers on WebViews
Universal Links / Link Capturing
Until now, no news that says will be implemented on the next version 14. As I said in the old post, I think iOS doesn't want to support these in PWA because these features have a bigger chance to be unnecessary exploited(spam, etc). And also maybe they want to force developers to create the native application rather than the progressive web application.
I just want to let you know: Apple will support push notifications for web apps! This news was published at the WWDC2022. Apple will release Web Push with Safari 16 on macOS (Ventura) in a few months (2022) and for iOS and iPadOS in 2023.
See: https://webkit.org/blog/12945/meet-web-push/
Until this is working, I will use this Flutter wrapper thats embeds the PWA in a Webview.

How can send push notifications to web application on iOS devices?

I struggle to find a solution how can I send web push notification to iOS devices? For Android there is no problem I use service worker and GCM.
But I found service worker for iOS push notifications is under construction.Is there a way for iOS devices?
If by web application you consider an app that opens in Safari the answer is: you can't send web notifications to iOS. Documentation:
Notifications for websites do not appear on iOS
If your web application is a native app with web view in it for content loading then you'll have to use native push notifications.
Is there a way for iOS devices?
It's not possible at the moment and there isn't any workaround for websites.
You need to create a native or hybrid app for iOS if you want push notifications.
Let’s ask Apple to add Web Push Notifications to iOS

Sending a notification from OS X to iOS

I have a Mac application and an iOS application. I need to display a notification on iOS, coming from the Mac app.
Is there any easier way to do it than using Push Notifications or network sockets (UDP or TCP)? Maybe Apple provides it away?
I need to make sure that the user hears this notification. The application should launch in the background and start playing sound.
If they are on the same network you can use bonjour ( https://developer.apple.com/bonjour/index.html ) for communication between mac app and iOS app.
If they are on different network you have to use a server, the server will be connected to both mac app and iOS app via tcp, and you can send msgs via the server. And if the iOS device is locked or app is in background you have to implement push notification for sending data to the iOS app.
Not sure of your use case, but using Apple's push notifications to serve notifications for your app seems like a suitable choice. Again, not sure of your use case, but an alternative may be to send a text-message using the Twilio API.
There is another option known as BLE .With BLE you can interact between mac and iOS using core bluetooth framework.
When you receive any message from mac to iOS using this framework you can show a local notification and can wake an app, since BLE also works well in background mode.
For mac to act as peripheral there is a good open source project over here.
you can find more information about BLE here.
Hope this helps.
I think the only acceptable solution is to send push notifications via APNS from mac to iOS device due to limitations on app lifetime on iOS. There is nothing hard in implementing APNS, there are lots of ready implementations, like NWPusher - you may copy it to your project and setup the environment - keys, device tokens - and you're done. To transmit tokens from iOS to your mac app, you may use tons of ways. For example, implement simple web-service on mac and send tokens via http/https.
You may also use a ready server-side implementations, like parse.com, to send push notifications.

Are iPhone's apps notifications going to be triggered on the Apple Watch by default, without even creating an actual Watch app?

I would like to support my iPhone's app Local Notifications in the Apple Watch from the very first moment the Watch is released, but I don't plan on building a Watch App yet.
From what I researched, it seems like iPhone's notifications will be automatically supported on the Watch, without needing any additional development or WatchKit implementation.
Apps are not required to do anything to support notifications. The system provides a default notification interface that displays the alert message from the notification. However, apps can customize the notification interface and include custom graphics, content, and branding.
Is this correct?
If so:
1. Will notifications on the Watch have action buttons just like configured for the iPhone app?
2. Is there any way I can test that on the simulator to be sure it works as expected?
If not:
3. Is there any way to support only notifications without creating a Watch app?
This is the more related question I found so far, but it's not really what I'm looking for. How to trigger notifications using WatchKit
I would like to support my iPhone's app Local Notifications in the Apple Watch from the very first moment the Watch is released
Yes notifications for your iOS application will work from day one on Apple Watch.
Will notifications on the Watch have action buttons just like
configured for the iPhone app?
If your iOS app already supports actionable notifications they will work with Apple Watch.
Is there any way I can test that on the simulator to be sure it works
as expected?
Good question actually, you can't test your current iOS app's notifications working on the simulator but you can test a custom notification interface from WatchKit.
You should file a feature request for this.
Is there any way to support only notifications without creating a Watch app?
No, you'll need to provide a sample Notification JSON payload as part of an WatchKit Bundle, which requires submitting an Apple Watch app.

Resources