---
title: Packaging a web extension for Safari
framework: safariservices
role: article
role_heading: Article
path: safariservices/packaging-a-web-extension-for-safari
---

# Packaging a web extension for Safari

Package your existing extension as a Safari web extension using Xcode’s command-line tool.

## Overview

Overview If you create a web extension that works in a browser other than Safari, you can deploy it in Safari by using the Safari web extension packager. The packager: Creates an Xcode project Configures the Xcode project with a macOS app or iOS app that installs the extension in Safari Configures a Safari web extension with your extension files in the Xcode project Safari web extension packager is available as a command line tool which you can use alongside Xcode on a Mac, or as a web-based tool available in App Store Connect. To learn more about using the web-based tool, see Packaging and distributing Safari Web Extensions with App Store Connect. Run the packager To run the packager, open the Terminal app and run the xcrun command with the safari-web-extension-packager option, providing the path for your existing extension files. xcrun safari-web-extension-packager /path/to/extension note: This tool used to be named safari-web-extension-converter. If the packager needs more information, it asks you interactively, or you can provide the following command-line options: important: By default, the packager creates a reference in the Xcode project to the resources in the path you provide. As a result, changes you make to the original extension update your packaged Safari web extension and vice versa. If you prefer to keep your original and packaged extensions separate, use the --copy-resources option to make a copy of the original files. New Xcode projects require you to select either the Swift or Objective-C language for native development. For your Safari web extension, you may not need to make any native customizations at all because your extension uses the JavaScript, HTML, and CSS you provide. If you are unsure of which language to use, select Swift. If the packager runs interactively, it asks you to confirm your selections and gives you the opportunity to update them. Review the manifest warnings The packager generates and opens your new Xcode project. The packager reports any manifest keys that the current version of Safari doesn’t support. Warning: The following keys in your manifest.json are not supported by your  current version of Safari. If these are critical to your extension, you  should review your code to see if you need to make changes to support Safari: downloads offline_enabled

Review any reported exceptions, and see Assessing your Safari web extension’s browser compatibility for details on how to resolve them. Build and run your converted Safari web extension To see your converted extension in Safari, follow the instructions in Running your Safari web extension. Add iOS to your existing Xcode project If you have an existing Xcode project with a macOS Safari web extension, and you want to add support for iOS to it, use the packager with the --rebuild-project option. xcrun safari-web-extension-packager --rebuild-project /path/to/myExtension/myExtension.xcodeproj Provide the path to your current extension’s Xcode project file (including the xcodeproj file extension). The packager creates a new Xcode project with both macOS and iOS extensions from your existing project, and prints manifest warnings.

## See Also

### Extension conversions and packaging

- [Packaging and distributing Safari Web Extensions with App Store Connect](safariservices/packaging-and-distributing-safari-web-extensions-with-app-store-connect.md)
- [Converting a Safari app extension to a Safari web extension](safariservices/converting-a-safari-app-extension-to-a-safari-web-extension.md)
