Web Push for Web Apps on iOS and iPadOS

I think this would be pretty neat to have in Xojo.


create a feature request in xojo issues? this would be a good addition.

Is this different from what Xojo already offers (Xojo Cloud)?

It is. The blog post is about doing it with an iOS app. Some parts are relevant (the sending part) but the ability for a web app to receive them is what’s new.

That said, it’s important to remember that Xojo web apps require an existing connection to the back-end to run any logic. You could probably put some handler code in JavaScript, and probably copy that data to a cookie before the connection resets so you can read it when the next session starts, but It’s going to be challenging to get any feedback from the user unless all of the logic is on the browser side.

I’m hoping this would enable a notification that there’s “interaction required” for a xojo web app that is backgrounded or closed. Keep in mind one of the requirements is that the user has added the web app to their home screen.

It’ll be interesting to see what becomes of this. Having watched the WWDC22 video just now, full background support (when safari is not running) only exists on macOS Ventura, so unless your users are on latest and greatest macOS and iOS, they still may not get every notification (unless they leave Safari running all day).

That said, this would be relatively easy to implement as a WebSDK control.

This is iOS / iPadOS specific. It should not require safari to be open to receive a push.

I understand what you’re saying, but the technology also applies to Safari on macOS Ventura. If you do this in a web app, you’re not going to be able to control whether users are using a phone, tablet or a desktop computer to access it.

This is a game changer for developers that want to target iOS without the red tape. This is also a win for web standards in general. There are lots of apps that could have avoided the 30% tax because they needed one more feature: push.

1 Like