A Step-by-Step Guide to Porting Your Chrome Extension to Safari

February 10, 2022

Apple has revealed the new macOS 11 Big Sur with the addition of new features and upgrades to the existing ones. They also added support for making it easier to port an existing extension from Chrome and other browsers. Although Safari has its own extension, it is nowhere close to the number of extensions available on Google Chrome. This accounts for the success of Chrome compared to Safari. Chrome users are not willing to migrate to Safari because they won’t find the great variety of extensions that are available on Chrome. But now that porting your Chrome extension to Safari is easy, more users will be engaged towards Safari.

 

Google Chrome extension is a software program that provides additional functionality to modify and improve the existing behavior of the Chrome browser. You can see Chrome extensions by entering chrome.google.com/webstore in the address bar of your web browser. There are 137,345 Chrome extensions available with millions of daily users. Chrome extensions have helped users to block ads, speed up the browser, manage websites, change browser appearances, and much more.

 

Why Safari

Safari is a web browser developed by Apple that was first introduced back in 2003, and it became popular very quickly. It is currently supported on macOS, IOS, and iPadOS. Previously it was also supported on Windows between 2007 to 2010. Safari is also the most popular web browser in the world after Chrome, with a global market share of 19.22 percent, which means that around two in every ten people use Safari. However, in the United States, Safari has a higher market share of 35.56 percent, which means that many users in the United States prefer Safari over other browsers. It is also worth noting that Chrome maintains its highest market share globally as well as in the United States. 

 

The reason millions of people around the world prefer Safari is that it has a nice and clean UI, moreover, it works seamlessly on all Apple devices. The Safari browser is optimized by Apple for a great performance on all iOS devices which is why a lot of Apple users use this as their default browser. However, like we mentioned before, Safari does not have a huge marketplace of extensions. And this is where porting your Chrome extensions to Safari will come really handy! 

 

Porting Your Chrome Extension to Safari: Step-by-Step Guide

With new updates on macOS, porting your Chrome extension to Safari is going to be very easy, if you have installed Xcode 12 and Safari 14 in your Mac. Moreover, contrary to general belief, you don’t need to have an Apple Developer Program account or any development skills to do it.

 

Below are the steps that you need to follow for porting your Chrome extension to Safari:

 

  1. First, copy the URL of the extension from the Chrome Webstore that you are interested in migrating to Safari

 

  1. Then, go to the CRX Extractor , paste the URL in the input bar on the left and click ‘Download’. This will extract all the source code. 

 

  1. Once it is downloaded, drag and drop the file where it says ‘Drop .crx file here, or click the button to choose the file’. Now your source code zip file is ready.

 

  1. Extract the zip file and open ‘Terminal’ in macOS. Here you will need to type two commands. First, to select Xcode, type sudo x-code -s  <xcode app path> in the terminal.

 

  1. Then to convert your extension, type cxrun safari-web-extension-convert <extension path>. While running, choose ‘Yes‘ as the default option if anything comes in between. This will create and open a new extension folder in the Xcode.
  2. Once Xcode is opened, go to the  ‘Toolbar’ on your right and select ‘Products’ and then click ‘Archive’. Doing this will run another build script.

 

  1. You will see new options popping up on your screen. Click on ‘Distributed App’ and then select ‘Development’ and hit ‘Next’.

 

  1. An option would appear prompting to choose a development team from accounts. If you have an account already, then select and press ‘Next’. In case you don’t have an account, you will need to create one first. Click on ‘Add Accounts’ and Sign In to iCloud. You will see a ‘+’ sign at the bottom left of your window. Click on it and enter your ‘Apple Id’ and hit ‘Next’. You can now close this window. Now you can select your new account and press ‘Next’.

 

  1. A checkbox would appear showing two options; Select the one which says ‘Automatically sign in’ and hit ‘Next’. Here it might take some processing time.

 

  1. Now go back to your extracted folder and drag & drop the file with the  ‘.app’ extension to the Mac’s Applications folder. You may ignore the other files in the folder.

 

  1. Finally, double click the file with the ‘.app’ extension in your Application folder and select ‘Open and Quit Safari Extension Preferences‘. 

 

There you go! You have successfully ported your chrome extension to Safari. 

 

We hope that this article helped you in porting your Chrome extension to Safari. In case it didn’t work out, we highly encourage you to go through the steps again as you might have missed something. You may also reach out to us if you have any queries. 



Want to get a Custom Web Extension?

PubGENIUS is a software development firm that specializes in providing customized and high-quality web development solutions using the latest tools and technologies. We have a team of highly qualified and experienced developers who can create a professional website or a web extension based on your requirements. PubGENIUS has always followed the best development practices to ensure that our products meet the highest international standards and fulfill our clients’ expectations.

 

If you are looking for a professional website or extension, you may contact PubGENUIS.