{"id":38542,"date":"2023-02-21T15:57:51","date_gmt":"2023-02-21T20:57:51","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38542"},"modified":"2024-05-03T09:32:22","modified_gmt":"2024-05-03T13:32:22","slug":"web-push-for-web-apps-on-ios-and-ipados","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/02\/21\/web-push-for-web-apps-on-ios-and-ipados\/","title":{"rendered":"Web Push for Web Apps on iOS and iPadOS"},"content":{"rendered":"<p><a href=\"https:\/\/webkit.org\/blog\/13878\/web-push-for-web-apps-on-ios-and-ipados\/\">Brady Eidson and Jen Simmons<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=34823402\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/webkit.org\/blog\/13878\/web-push-for-web-apps-on-ios-and-ipados\/\"><p>Today also brings the first beta of Safari 16.4. It&rsquo;s a huge release, packed with over 135 features in WebKit &mdash; including RegExp lookbehind assertions, Import Maps, OffscreenCanvas, Media Queries Range Syntax, <code>@property<\/code>, <code>font-size-adjust<\/code>, Declarative Shadow DOM, and much more.<\/p><p>[&#8230;]<\/p><p>Now with iOS and iPadOS 16.4 beta 1, we are adding support for Web Push to Home Screen web apps. Web Push makes it possible for web developers to send push notifications to their users through the use of <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Push_API\">Push API<\/a>, <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Notifications_API\">Notifications API<\/a>, and <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Service_Worker_API\">Service Workers<\/a> all working together.<\/p><p>A web app that has been added to the Home Screen can request permission to receive push notifications as long as that request is in response to direct user interaction &mdash; such as tapping on a &lsquo;subscribe&rsquo; button provided by the web app. iOS or iPadOS will then prompt the user to give the web app permission to send notifications. Once allowed, the user can <a href=\"https:\/\/support.apple.com\/en-us\/HT201925\">manage those permissions per web app<\/a> in Notifications Settings &mdash; just like any other app on iPhone and iPad.<\/p><p>[&#8230;]<\/p><p>In iOS and iPadOS 16.4 beta 1, third-party browsers can now offer their users the ability to add websites and web apps to the Home Screen from the Share menu.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/daringfireball.net\/linked\/2023\/02\/16\/web-push-web-apps-ios\">John Gruber<\/a>:<\/p>\n<blockquote cite=\"https:\/\/daringfireball.net\/linked\/2023\/02\/16\/web-push-web-apps-ios\">\n<p>Push notifications are foremost, but a lot of longstanding feature requests for web apps are being added with this release. [&#8230;] It&rsquo;s impossible to say whether increased regulatory scrutiny has changed Apple&rsquo;s priorities regarding iOS&rsquo;s support for web apps, but it sure seems like a factor.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@jackwellborn\/109881413062705512\">Jack Wellborn<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@jackwellborn\/109881413062705512\">\n<p>While I no longer think embracing PWAs might ease regulatory pressure, my take that Apple should embrace PWAs as a way to control the experience is aging quite nicely.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/09\/13\/safari-16\/\">Safari 16<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/02\/07\/the-danger-of-sideloading-chromium\/\">The Danger of Sideloading Chromium<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/07\/27\/safari-frustrations\/\">Safari Frustrations<\/a><\/li>\n<\/ul>\n\n<p id=\"web-push-for-web-apps-on-ios-and-ipados-update-2024-05-03\">Update (2024-05-03): <a href=\"https:\/\/twitter.com\/brian_lovin\/status\/1785444217155997885\">Brian Lovin<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/brian_lovin\/status\/1785444217155997885\">\n<p>You can spend all the time you want building a PWA, but at the end of the day, push notifications will just randomly stop delivering until the app is re-opened.<\/p>\n<p>Apple went halfway.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Brady Eidson and Jen Simmons (Hacker News): Today also brings the first beta of Safari 16.4. It&rsquo;s a huge release, packed with over 135 features in WebKit &mdash; including RegExp lookbehind assertions, Import Maps, OffscreenCanvas, Media Queries Range Syntax, @property, font-size-adjust, Declarative Shadow DOM, and much more.[&#8230;]Now with iOS and iPadOS 16.4 beta 1, we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-02-21T20:57:54Z","apple_news_api_id":"0c59bdb4-62b5-4ed8-8f04-26329382c8eb","apple_news_api_modified_at":"2024-05-03T13:32:27Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ADFm9tGK1TtiPBCYyk4LI6w","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[31,2185,1074,103,96,328],"class_list":["post-38542","post","type-post","status-publish","format-standard","hentry","category-technology","tag-ios","tag-ios-16","tag-push-notifications","tag-safari","tag-web","tag-webkit"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38542"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38542\/revisions"}],"predecessor-version":[{"id":43074,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38542\/revisions\/43074"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}