<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gustavo da Silva Braghin on Medium]]></title>
        <description><![CDATA[Stories by Gustavo da Silva Braghin on Medium]]></description>
        <link>https://medium.com/@gbraghin?source=rss-8f208f35ce69------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pHDtcNXoaNpbfcS10U2guw.jpeg</url>
            <title>Stories by Gustavo da Silva Braghin on Medium</title>
            <link>https://medium.com/@gbraghin?source=rss-8f208f35ce69------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:28:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gbraghin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Safari app extension VS Safari web extension]]></title>
            <link>https://medium.com/@gbraghin/safari-app-extension-vs-safari-web-extension-5615902bc7cd?source=rss-8f208f35ce69------2</link>
            <guid isPermaLink="false">https://medium.com/p/5615902bc7cd</guid>
            <category><![CDATA[webextensions]]></category>
            <category><![CDATA[safari-extension]]></category>
            <category><![CDATA[app-extension]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[apple-development]]></category>
            <dc:creator><![CDATA[Gustavo da Silva Braghin]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 22:43:54 GMT</pubDate>
            <atom:updated>2023-11-07T22:45:32.272Z</atom:updated>
            <content:encoded><![CDATA[<p>In the last few weeks I&#39;ve been studying about safari extension development and I faced some difficulties to understand the difference between Safari app extension and Safari web extension. After some days reading Apple documentation and writing down the main topics about it, I decided to share what I&#39;ve found with the world!</p><h3>Safari app extension</h3><blockquote>A Safari app extension can add new functionality to Safari by reading and modifying webpage content. These capabilities enhance the tools you use, the tasks you can accomplish, and the data you can access in your browser. A Safari app extension is <strong>uniquely</strong> <strong>useful</strong> because it can communicate with a native app. Sharing data between an app and Safari lets you integrate app content into Safari or send web data back to the app, enabling a unified experience for a web version and a native version of an app.</blockquote><p>So, what <a href="https://developer.apple.com/documentation/safariservices/safari_app_extensions">Apple</a> tell us about app extension is that its main goal is to communicate with a native app. We can understand that it should be used to send and receive data from native app to safari and vice versa. And that&#39;s it. If you&#39;re looking for something different from it, maybe app extension is not what you need.</p><h3>Safari web extension</h3><blockquote>While Safari app extensions are useful for sharing code between your native macOS app and Safari, you build Safari web extensions primarily on JavaScript, HTML, and CSS, and can repackage them to work in other browsers.</blockquote><p>What <a href="https://developer.apple.com/documentation/safariservices/safari_web_extensions">Apple</a> is saying here is that if you want a browser extension, the web extension works in safari and can be repackage to chrome, firefox, edge, etc.</p><p>OBS: In <a href="https://developer.apple.com/wwdc23/10119">wwdc23</a> Apple makes clear that the future is web extension. It says:</p><blockquote>There are four ways to build safari extensions: content blockers, share extensions, app extensions, web extensions, Safari 17 continues to support all of these types, but the future of browser customization lies in web extensions.</blockquote><p>And:</p><blockquote>Web extensions are the best way to build extensions for safari across platforms. With a single shared codebase, web extensions allow you to customize the capabilities of Safari on iOS, iPadoS, macOS, an now xrOS.</blockquote><p>So, if you&#39;re willing to develop a new extension that you want working for a long time from now, or a product for the market, or a cross platform extension, Safari web extension is what you&#39;re looking for.</p><h3>Difference between app and web extensions</h3><p>Different from safari app extension, the focus in safari web extension is not to communicate with a native app but to make an extension add custom functionality to safari and others browsers as chrome, firefox, edge, etc. But safari web extension also communicates with native app through a background script. Also the app extension&#39;s popover is native (swift) and in web extension is not (HTML, CSS, JS).</p><p>That&#39;s how this popover look&#39;s like if you&#39;ve never seen one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*DgZ8aHKgMe5QcKHWb3kUXQ.png" /></figure><p>Another difference is how them communicate. <strong>Safari app extension</strong> communicates with native app. There&#39;s an injected script from extension to the browser that can read and modify web content, and also send and receive data from/to native app. <a href="https://developer.apple.com/documentation/safariservices/safari_app_extensions/passing_messages_between_safari_app_extensions_and_injected_scripts">See here</a>. <strong>Safari web extension </strong>communication works <a href="https://developer.apple.com/documentation/safariservices/safari_web_extensions/messaging_between_the_app_and_javascript_in_a_safari_web_extension">from extension&#39;s scripts (injected into browsers) to native app (vice versa)</a> and <a href="https://developer.apple.com/documentation/safariservices/safari_web_extensions/messaging_between_a_webpage_and_your_safari_web_extension">from webpages scripts to extension&#39;s background script.</a></p><p>I&#39;m not going to show code and how to develop these communications in this post, but I want to do it later in another post and link it here.</p><p>That&#39;s it. I hope this helped you and I wish you the best! 🚀 🚀 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5615902bc7cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>