- Ensure your extension uses APIs compatible with both Chrome and Safari. Adjust any Chrome-specific code to seamlessly work on Safari.
- Modify the manifest file to meet Safari's requirements. Update permissions, icons, and specifications to align with Safari's guidelines.
- Align your extension's UI with Safari's design principles for a consistent and user-friendly experience. Address any UI guideline differences between Chrome and Safari.
- horoughly test your extension on Safari using its developer tools. Identify and resolve compatibility issues, ensuring all features function as expected without performance problems.
- Be aware of security model differences between Chrome and Safari. Update your extension's code to comply with Safari's security requirements and adjust permissions accordingly.
First natural step after publishing your Chrome extension is to migrate to other platforms such as Firefox or Safari. Before we move on to how we can migrate Chrome extensions to Safari, let's first understand why you should.
Why should you build a Safari Extension?
Since Safari is the second most popular browser especially in the U.S.A, an organization can see major growth in their product users, and so in their revenue, by tapping into that user group. Another reason to migrate to Safari is B2B customers like to have their extensions compatible with as many browsers as possible. Not supporting popular browsers can lead to a substantial drop in conversion. These are two of the most important reasons to make Safari migration a priority.
Market Share Stats
Now that we are talking about Safari, it is important to know the user base of Safari worldwide and in the USA, especially on the desktop.
Browser market share worldwide – Feb 2021 – July 2021
Browser Market Share USA – Feb 2021 to July 2021
As you can see, Safari has a significant 36% user base in the USA, and you can now evaluate what that could mean to your business.
It is equally important to know Safari version market share as extension development may differ based on the Safari version. So here it is.
Safari Version market share Feb – July 2021
Safari 14.1 has over 60% market share among all the Safari versions. And according to all estimates, it will increase further.
As mentioned before, Safari extension development could differ according to the version and on that basis, these are the different ways in which an extension can be built.
1. Safari Web extensions: macOS 11 and later, macOS 10.14.6 or 10.15.6 with Safari 14 installed, and iOS 15 and later.
2. Safari App Extension: macOS 10.12 and later, and in OS X 10.11.5 with Safari 10 installed.
3. Version 9 and less => .Safariextz (unsupported after Safari 9).
Having that in mind, we can decide what path we can take to build our Safari extension.
As we know Safari Web Extensions are supported on 14 and above, we can build either a Web extension or App extension.
To get started with creating a Safari web extension, you have two options:
1. Convert your existing extension into a Safari web extension, so you can use it in Safari in macOS and iOS and distribute it in the App Store. Xcode includes a command-line tool to simplify this process.
2. Build a new Safari web extension in Xcode using the built-in template. You can then repackage the extension files for deployment in other browsers.
- You bundle Safari app extensions inside your app and distribute them through the App Store. You can distribute a Safari app extension with a Mac app or a Mac Catalyst app.
- Because you distribute your app and your Safari app extension together, you minimize the chances of installing mismatched versions.
- Your Safari app extension can securely communicate with your app using shared resources.
What way is best for you?
If you are building a new extension, you go for Web extension, as it is way too easy to build the application as compared to app extension. This method also works great if you have the extension already built for Chrome, Edge or Firefox.
Please Note, Safari Web extensions has some limitations with using web extension APIs and are not fully developed. They may need to have a workaround in some cases as compared to other extensions. One other thing to remember is, cookies are not shared between website and extension.
What kind of a team do you need to build Safari Web and App extensions?
An experienced Chrome extension developer can create Safari web extensions with a learning curve. The learning curve includes learning XCode, support for web extension APIs, and publishing process for app store. macOS/iOS developers can help with the publishing.
Safari app extensions can be developed by macOS app developers who have hands-on experience with Objective-C or Swift.
What do you need to distribute the App?
Create an Apple ID and enroll for either Apple Developer or Apple Developer Enterprise Program. This will enable you to publish your products on the App Store for iPhone, iPad, Mac, Apple Watch, Apple TV, and iMessage.On the Safari Extensions Gallery, Membership in the Apple Developer program would cost $99 and $299 for the Enterprise Program annually.
Next, Create an identity via https://developer.apple.com/account/resources/identifiers/list/bundleId
In-App store connect, create an app of ‘macApp’
In the bundle, ID drop-down, just select the one newly created
Once you are ready with the macApp, you will need to submit your extension for review to get it published on the Mac App Store. However, Apple might suggest changes and you have to revise your extension to comply with Apple policies. You can check the review guidelines of the Apple App Store here.
Once you have your app published on the Mac app store, now users can search for the extension and install the extension. You can also share your extension link with your users.
Next, on your marketing website, you can detect Safari and show the correct link to the Safari extension with directions on how to install it.
It is always a good idea to have your product on as many platforms as possible, so as to have a good scope of reaching the largest number of users and eventually increase your user base. After seeing the numbers, it is clear that Safari is the one platform that you wouldn't want to miss.
Coditude Solutions has over a decade of experience developing Browser Extensions. If you have any questions or queries about building/converting an extension, our dedicated Safari extension, and plugin development team will be happy to answer them for you. Just drop us a line at browser extension services.