Building and Shipping a Safari Web Extension on macOS (Manifest V3, 2025 Edition): A Complete Step-by-Step Guide: Difference between revisions

Created page with " <span id="quick-overview"></span> = 1) Quick overview = <blockquote>Quick version notes (today) * '''Manifest V3 is supported in Safari''' (initially from Safari '''15.4+''') and remains supported in current Safari. ([https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/?utm_source=chatgpt.com WebKit]) * Latest '''Xcode''' release (stable): '''Xcode 26 (17A324)''' (Apple’s official releases page). * Use the latest '''macOS''' and '''Safari''' available i..."
 
 
Line 10: Line 10:
</blockquote>
</blockquote>


'''What is a Safari Web Extension?''' A Safari Web Extension lets you add features to Safari using the same '''WebExtensions''' APIs used by Chrome, Firefox, and Edge. You write HTML/CSS/JS, plus a JSON file called a '''manifest''' that tells the browser what your extension can do. Safari ships an '''Xcode template''' that wraps your web extension inside a small '''Mac app''' so users can install it from the Mac App Store. ([https://developer.apple.com/documentation/safariservices/creating-a-safari-web-extension?utm_source=chatgpt.com Apple Developer])
'''What is a Safari Web Extension?'''  


'''How it differs from legacy Safari App Extensions''' Legacy “Safari App Extensions” were Mac-only and had different APIs. '''Safari Web Extensions''' use the cross-browser WebExtensions model and are the modern choice. (Apple still documents app extensions, but new projects should use Web Extensions.) ([https://developer.apple.com/documentation/safariservices/building-a-safari-app-extension?utm_source=chatgpt.com Apple Developer])
A Safari Web Extension lets you add features to Safari using the same '''WebExtensions''' APIs used by Chrome, Firefox, and Edge. You write HTML/CSS/JS, plus a JSON file called a '''manifest''' that tells the browser what your extension can do. Safari ships an '''Xcode template''' that wraps your web extension inside a small '''Mac app''' so users can install it from the Mac App Store. ([https://developer.apple.com/documentation/safariservices/creating-a-safari-web-extension?utm_source=chatgpt.com Apple Developer])
 
'''How it differs from legacy Safari App Extensions'''  
 
Legacy “Safari App Extensions” were Mac-only and had different APIs. '''Safari Web Extensions''' use the cross-browser WebExtensions model and are the modern choice. (Apple still documents app extensions, but new projects should use Web Extensions.) ([https://developer.apple.com/documentation/safariservices/building-a-safari-app-extension?utm_source=chatgpt.com Apple Developer])


'''Typical use cases'''
'''Typical use cases'''
Line 59: Line 63:


<span id="prerequisites-version-checks"></span>
<span id="prerequisites-version-checks"></span>
= 2) Prerequisites &amp; version checks =
= 2) Prerequisites &amp; version checks =