I have developed extension for chrome and later I made browser specific using gulp.
So I know left with folders.
/Chrome
/Firefox
|-/data/
|-/locale/
|-index.js
|-package.json
/Safari
So for the chrome it was simple drag and drop.
So problem I faced is when I try to load on firefox browser at about:degugger it would reject my extension saying it is corrupt.
For Safari I searched on their website and I found documentation for only using Xcode editor.
Install unpacked extension on Safari
Open Safari
Go to menu Develop->Show Extension Builder (If there is no Develop menu, open Safari Preferences->Advanced, and check Show Develop menu in menu bar)
In Extension Builder window, click + at the left-bottom of the window, then click Add Extension
Select your extension folder (Your extension folder should be named as YourExtName.safariextension)
Now your extension will show at left panel of Extension Builder, you can click Install button to install it
Install unpacked extension on Firefox
Latest version of Firefox support load temporary extensions (Not sure from which version).
Steps:
Navigate to about:debugging
Click Load Temporary Add-on button
Select manifest file of you extension
Safari
Open the Gallery by choosing Safari Extensions from the Safari menu.
Click “Install now" next to the extension that you want to install.
You can also get extensions directly from your favorite developers. When you download an extension from a developer, you get a file that ends with .safariextz. Double-click the file to install the extension. It isn't signed or hosted by Apple, so Safari asks you to confirm that you trust the source and want to install the extension.
Firefox
You need to enable the debug mode check more information here
Related
I have an Electron App that loads a Safari App Extension in the Safari Browser.
When I open the browser, I can see my extension listed in Safari -> Preferences... -> Extensions.
As soon as I enable it, I see the Toolbar Icon appear then disappear.
Is there a way for me to debug my extension when it is loaded from Electron?
After some research I found out that we can find crash logs on a Mac machine in ~/Library/Logs/DiagnosticReports/
I’ve started a Safari App Extension project, following Apple’s documentation.
I’ve got my (empty) app, and my very minimal extension. I’ve archived the app, signing it with my Developer ID. When I copied the archived app to a friend’s Mac, ran it, and launched Safari, the app extension showed up in the Extensions pane of Safari’s preferences (with the parent app’s icon), and when enabled, worked fine.
However, when I run the app on my Mac (where I developed it), and launch Safari, the app extension does not show up in Safari’s Extensions preference pane unless I check “Allow Unsigned Exceptions” in Safari’s develop menu, as described in this answer — and when it does, it has a generic app icon, rather the parent app’s icon.
Although I hope to eventually make the app and the app extension available to other people, I’m mainly making it for myself. As such, I’d like to be able to use it without having to check “Allow Unsigned Exceptions” every time I start Safari.
How can I make the app extension show up in Safari’s Extensions preference pane on the computer I develop the extension on?
I found a debug version of my app and app extension in my user Library folder:
~/Library/Developer/XCode/DerivedData/{APP_NAME_FOLLOWED_BY_LONG_STRING}/Build/Products/Debug
After deleting the contents of this folder, restarting Safari, and allowing unsigned extensions again, my app extension no longer appeared with the generic icon in Safari’s Extensions preferences.
(I’m a real Xcode newbie, so I’ve no idea if deleting debug builds is a thing that I can/should do via Xcode instead.)
I then archived my app again and ran it, then restarted Safari. Now my app extension shows up in Safari’s Extensions preferences, with its proper icon and everything, and stays enabled between restarts.
I now want to write extension for Safari.
But xCode offers me first make the app, and then add the safari extension.
OK, I created an empty application, started writing my extension, but I have a question. Can I release an extension without reference to the application? I do not understand the process.
I want to just create a safari extension, without reference to a particular application, because my product is a Safari extension, not a application.
I know it's late but somebody else might stumble upon this topic and I think the following information can be useful.
It seems that according to Apple's documentation extensions that are created using Safari Extension Builder will not longer be supported: https://developer.apple.com/library/archive/documentation/Tools/Conceptual/SafariExtensionGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009977-CH1-SW1
Developer-signed Safari extensions are not supported in Safari 12. Safari extensions distributed in the Safari Extension Gallery are deprecated, and Safari 12 is the last release to support them. Safari by default will turn off Safari extensions using canLoad. Instead, use Content Blocker extensions. New submissions to the Safari Extensions Gallery will be accepted until the end of 2018.
So the only way seems to be to
Use Safari app extensions to add features to the Safari browser.
https://developer.apple.com/documentation/safariservices/safari_app_extensions:
this looks like the only way to develop an extension as of today (2018), alas.
There are 2 types of Safari extensions: ones that bundled with a Mac app (Safari App Extensions) and standalone extensions. I belive standalone extensions can be created using Safari Extension Builder (avaliable in Develop menu in Safari), without Xcode. You can learn more about Safari extensions here.
As Safari extension Builder is deprecated, you now use Xcode. Simply, a Safari Extension can either be bundled with an app, or standalone. To start a new standalone extension, that is, not part of a desktop app:
Launch Xcode
Choose File > New > Project
Select the template Safari Extension App in the Other section
Click Next (continue through the normal process to develop your Safari Extension)
Alternatively, if you wanted to add a Safari Extension to your existing project:
Launch Xcode
Open your existing app project
Choose File > New > Target
Select the template Safari Extension App in the Other section
Click Next (continue through the normal process to develop your app including Safari Extension)
An example might be Grammarly whereby you can download a desktop client and Safari extension (in a bundle) for macOS, or you may download the extension as a standalone app from App Store.
I want to load my Firefox cookies into a MozillaCookieJar object for a Python script that I'm writing. What I can't figure out though is where Firefox actually saves its cookies file.
I'm running macOS Sierra (10.12.3) and Firefox 53.
Firefox saves your cookies in a file called "cookies.sqlite", a SQLlite database in your Firefox profile folder.
From "Finding your profile without opening Firefox":
(OS X 10.7 or above) Click the Finder icon in the dock. On the menu bar, click the Go menu, hold down the option or alt key and select Library. A window will open containing your Library folder.
Open the "Application Support" folder, then open the "Firefox" folder, and then the "Profiles" folder.
Your profile folder is within this folder. If you only have one profile, its folder would have "default" in the name.
For instance:
/Users/USERNAME/Library/Application\ Support/Firefox/Profiles/########.default/cookies.sqlite
I am trying to install the signed Firefox extension programmatically.
As of now I have tried to installed it by using windows registry but it is not installing in this case.
Then I have tried to installed by copying the xpi file to %appdata%\Mozilla\Extensions{id}\ and %appdata%\Mozilla\Firefox\Profiles\hsqut0ez.default\extensions\ location. Extension get installed but it is disabled and browser shows up a message as "Mozilla Firefox Extension could not be verified for use in Firefox and has been disabled.".
When I install the extension by dragging it onto the Firefox window it gets installed fine and does NOT show the message.
Can anyone know how to installed signed extension programmatically into the the Firefox?
You need to specify that you want side-loading when uploading to AMO.