Submitting extension to Safari Extension Gallery - safari

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!

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?

Spotify Play Button is not working - playing only previews in recent Chrome

I was going back and forth with Spotify Cares Twitter for over four days. Finally they directed me here, so I hope one of the devs from Spotify will answer.
I am trying to put Spotify Play Button on the website. I was following the instructions from the documentation. Then I also found on the Spotify blog, that some details had changed in July 2018. So I have tried this code as well.
Whatever I did, the Play Button embed player plays only preview (30 seconds) when accessing website in the Chrome (version 68 and 69).
The code is simple and straight taken from the documentation/blog:
<iframe src="https://open.spotify.com/embed?uri=spotify:album:1DFixLWuPkv3KT3TnV35m3" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
This code I have put into the empty HTML, so completely no other code interfering. You can check it in the example on Codepen.
I have tried to isolate the issue and here's what I have found:
In Chrome it never works: neither when I am logged into Spotify nor when I am not and log in with the button that shows up in the player
In Chrome with/without SSL - in both cases it didn't work
In Firefox it works properly. When I log into Spotify on the browser, go to the page, it plays full tracks
Also asked my friends to go to the page with this code and - being logged into Spotify - it didn't work for them as well
The play button works properly in the examples on blog and documentation of Spotify - which is in their domain, so it is the same domain as the iframe content - this is a hint I think.
I have checked also recent changes in Chrome, but only one concerning iframe was adding allow on microphone and camera. Even using this one didn't help (but this should not be related actually).
I have also checked on recent Safari / MacOS - the issue is there as well (but not on Firefox/MacOS)
What can be the reason for the issue? How to solve this? Or maybe Spotify devs team need to fix it?
So the answer is quite obvious if you know where to look.
Under chrome://settings/content/cookies Google Chrome has this option Block third-party cookies. I had it enabled and that was the cause of the issue.
But why I didn't think of it before? It's because Google Chrome in such case adds to all non-white-listed (see below) sites a cookie icon with red X to the right side of the Address Bar. When one clicks it, it shows two options:
Always allow [url of the site] site to save cookies
Keep blocking the cookies
And since I had the first one selected it looked good to me back then.
But this option is not the same as "allow use of the third-party cookies", which is not available in the popup options window.
In fact to allow sites to use cookies from Spotify, you have to either:
Disable the option Block third-party cookies in the Chrome Settings in general
or add [*.]spotify.com to your white-list (I recommend this one)
And that way, any site can access spotify.com cookies to check if user is logged in to properly play music (full tracks or just previews).
And one final note: the site with the embed play button code must be accessed with SSL, so via https.
I didn't check how to change that for Safari on MacOS, but probably the solution is similar to this one.

Safari extension autoinstall

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.

Objective-c login to google and get user bookmarks

I'm working on a web browser for iOS and I'm trying to add google chrome sync for bookmarks. I've seen a few ps do this, like the chrome app and Mercury web browser. I can't find anything for the API to retrieve the bookmarks.

iOS App URL is not being detected

I have created a custom App URL for my iOS app. The URL format is similar to this:
myappname://texttobeparsed
This works fine when I paste the URL in safari, My App opens and correctly handles the URL. The problem is that other apps such as iMessage or Notes do not recognize this as a URL.
Why isn't this URL scheme being recognized as a URL? Could it have to do with how I set it up in my info.plist file or something else?
Or, does the URL need to be in a different format to be recognized?
I know it's possible to have the system recognize it as a URL in apps other than web-browsers because I've seen it before with other apps (ex. iTunes: itms://itunes.com/apps/appname or Twitter: twitter:// or Facebook: fb://).
There's nothing you can do about this. If the link isn't explicit (e.g. in an HTML email), these apps can just recognize a built-in set of standard URL schemes. itms:// is one of Apple's own schemes (for the iTunes Store), so it makes sense that it is supported in addition to the standard mailto://, http://, tel://... schemes.
Edit: I would guess that the information that is used to determine what constitutes a valid URL in text views etc. is cached somehow. Contrary to what I initially guessed, it seems that app-specific URLs do work in Notes, etc. I've tested this with tweetbot:// for example (which I have installed) and twitter:// (which I don't have installed) to verify that it doesn't just check for a pattern like *://, but actually uses information about the installed apps.
I'd suggest that you try to restart your device. If it's an issue with some cache, that might help and I don't think there's much else you could do if your URL scheme already works in Safari.
Update: I've installed the official Twitter app to test this, the twitter:// scheme wasn't immediately recognized in Notes, but after killing and restarting the Notes app, it worked.
Update 2: I've done a minimal test app with myappname:// as a custom URL scheme. Again, like with the Twitter app, it worked after restarting the Notes app, so it doesn't seem related to the popularity of the app or whether it's been submitted or not.
I can't answer as to why it's not working (beyond guessing that the link interpreter is hard-coded to only recognize certain URL schemes), but I can say that the typical way around this is to link to a web page, and have the web page redirect to your custom scheme.
It's slightly less elegant, because the user will see Safari open up briefly before being forwarded to your app, but it's also more robust because the web page can provide a link to the app store to install the app if it is not installed on the user's phone.