Safari extension autoinstall - safari

I want to host an extension on my own website
When user clicks a specific button on my site, extension should install automatically just like it does from Apple - Safari - Extension section https://extensions.apple.com

You cannot do that. Inline installation of extensions from 3rd party websites is not available on Safari.
You can however just download the extension yourself and open it programmatically.
Or
You can ask the user to download the extension and double click the extension from the downloads folder. However if you take this route you will need to have some UI to educate the user.

Related

Detect ios safari extension is enabled and allowed on all pages

I am developing an iOS safari extension. Right after the installation and opening the container app, I would like to take the users to a page which shows instructions on how to enable the extension and allow it to run on all pages. Is there a way to detect the state of the extension?
So, the flow will be as: User opens the container app, and we take the user to a page on safari and depending on:
(1) if the extension is enabled
(2) if the extension is allowed to run on all pages
How can I detect these two states from the extension ?
Tried looking around if there is an API to detect so. Doesn't seem there to be one?

shopify post purchase extension

Hi I'am trying to test a post purchase extension.
I tried the following steps:
registered my post purchase extension with the code provided
Served the extension using shopify extension serve
Installed the local app extension to firefox
Updated the firefox extension with the ngrok url
Tried to checkout from my development store
-No redirect occurs to the extension and nothing in logs, checkout goes directly to thank you page
if someone experienced could make a basic guide over this topic, that wold be awesome :)
I ran into a similar problem.
For dev stores, the store needs to have checkout extensions preview enabled. You can enable it during store setup in the partners panel. During set up you will be asked what extra features you need.
You need to enable checkout extensions in your main app settings in the partners panel
You need to enable preview mode in extension panel in partners panel. (if your extension is not on the list, remember to build and deploy it)
For checkout UI extension there is an extra step:
go to Online Store -> Themes -> Customize -> Find checkout page -> in customizer click link in the "Optimize your checkout with apps, fonts, colors, and more. Customize checkout" text (IMPORTANT: this will work only on new dev stores or the stores that have checkout UI feature enabled during setup; it's hard to tell exactly) -> scroll to the bottom and add your app.
I highly recommend going through Shopify documentation and tutorials slowly step by step :)
I wasted too much time on this detail.

Getting error using Firebase popup authentication in Word add-in

I was already using Firebase for authentication for other (related) projects and would like to stick with it.
Using Firebase with a Word add-in seems challenging. On Windows you're stuck with IE11 and on Mac (crucial for me) the browser used to load a taskpane is webkit, not the default browser.
I can get authentication on Windows to work just fine if I use signInWithRedirect (Google and Facebook).
But this won't work on Mac. Using signInWithRedirect opens a new tab in the default browser, which doesn't share cookies/data with the webkit browser the add-in actually uses.
When I switch to signInWithPopup, I get:
There is no application set to open the URL about:invalid%23zClosurez.
On Windows I get a popup IE11 window, for a split second, and it contains about:invalid%23zClosurez for a URL.
I have appdomains called out in my add-in XML manifest:
<AppDomains>
<AppDomain>https://writeitwithme-a114a.firebaseapp.com</AppDomain>
<AppDomain>https://www.firebaseapp.com</AppDomain>
<AppDomain>https://www.googleapis.com</AppDomain>
<AppDomain>https://www.facebook.com</AppDomain>
</AppDomains>
Any help appreciated. Worst case I drop to using manual registration, via Firebase, for Mac, but seems unfortunate to have to give up.
Just documenting for anyone finding this later.
I couldn't figure out how to use Firebase social login when creating an add-in for Mac. Every authentication window opened in the default browser, not the webkit engine used by Word on Mac. Sticking with manual login worked.
IE11 is always finicky when using localhost. I test elsewhere, then push files live and then try IE11 and social + manual login (via popup) works just fine.
I found the following resources from Microsoft docs that made this easier for me:
https://learn.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins
Basically you need to make a call to open up a dialogue box:
Office
.context
.UI
.displayDialogAsync(
'https://myDomain/myDialog.html',
{height: 30, width: 20, displayInIframe: true}
);
Then you can make your own page that does a login flow and passes a message (likely a credential of some kind) back to your plugin via the messageParent method:
Office.context.ui.messageParent(googleProfile);
From there you can do the following to sign in with the credential provided in your add-in:
firebase.auth().signInWithCredential(credential)
Also, be very careful with how you construct the URL of the dialogue box. I lost hours not knowing that the _host_Info param from the origin URL would mess stuff up (I was constructing my new URL from the origin URL). Figured it out in this github issue: https://github.com/OfficeDev/office-js/issues/378

Submitting extension to Safari Extension Gallery

I've built a safari extension but it seems like a black box in terms of submitting to the Safari Extension Gallery. I've googled it and looked at the Apple documentation but there are still several points that are unclear to me:
1) Does Safari Extension Gallery host the extension (i.e. like Chrome Web Store) or do I need to self host?
2) In the submit form, it ask for the URL. So if Apple does self host, can I just upload the built extension package to dropbox and give the dropbox URL in the form?
3) After submitting to the Extension Gallery, how long does it take for it to be approved? I heard 2-3 weeks, which is ridic compared to the 5 mins Chrome approval!

a href to chrome:// url in a chrome extension how to make it work

I've written a Chrome extension to use as an iframe in my own locally stored home page. I just want a way to access the basic settings, extensions, bookmarks, and so forth. I know this is denied in a standard html. I thought an api should do the trick:
onclick="chrome.tabs.create({url:'chrome://settings'});"
but to no avail. How can I access these settings?
You cannot access chrome pages from an extension. However you could get some settings with Chrome APIs
Specifically Bookmarks API, Installed extensions API