Chrome Extension Safari Porting — Developer Guide

3 min read

Porting Chrome Extensions to Safari Web Extensions

Safari Web Extensions allow you to bring your Chrome extension to Safari on macOS and iOS. While Safari uses a WebExtensions API layer similar to Chrome, there are important differences in tooling, distribution, and API support that you need to understand.

Conversion Tool

Apple provides the Safari Web Extension Converter to automate much of the migration process:

xcrun safari-web-extension-converter /path/to/your/extension

This tool:

After conversion, you’ll need to complete the process in Xcode to build and test.

Xcode Requirement

Unlike Chrome extensions, Safari extensions must be packaged as native macOS or iOS applications. This means:

API Compatibility

Safari supports the browser.* namespace with Promise-based responses, similar to Firefox. This is the recommended approach for cross-browser compatibility.

Supported APIs

Safari Web Extensions support a subset of Chrome APIs:

Unsupported or Limited APIs

Several Chrome APIs are not available or have limited functionality:

Manifest Differences

Your manifest.json requires Safari-specific configuration:

{
  "manifest_version": 3,
  "browser_specific_settings": {
    "safari": {
      "strict_min_version": "15.0"
    }
  }
}

Content Scripts

Content scripts are largely compatible with Chrome, with some considerations:

Background Scripts

Safari uses non-persistent background pages similar to Chrome’s event pages:

iOS Safari Support

The same extension works on iPhone and iPad with some considerations:

App Store Distribution

Distribution Channels

Extensions are distributed through:

Pricing

Unlike Chrome Web Store, you can charge for your extension through the App Store. This makes Safari a viable platform for commercial extensions.

Review Process

Apple’s App Store review is stricter than Chrome:

Testing

Use Safari’s built-in developer tools:

Limitations

Be aware of these Safari-specific limitations:

Cross-Reference

Part of the Chrome Extension Guide by theluckystrike. Built at zovo.one.