Hacker News new | past | comments | ask | show | jobs | submit login

Code at https://github.com/mozilla-mobile/focus - feel free to file issues/bugs/questions on Github. We primarily use Bugzilla for this project, but happy to move bugs around.



Why having a separate application with these features instead of adding them to Firefox for iOS ?

Is it planned to have content blockers support in Firefox for iOS ?


It is complicated. Here is the story of two WebView implementations in iOS:

Firefox is based on the WKWebView. Modern and Fast, but has a very poor (thin) API. It has zero options for interacting with the network stack, which is a requirement for content blocking. Bugs have been open since iOS 8, Apple does not seem to be interested or does not have the resources to surface more API. All the APIs are in WKWebView, just private.

Focus uses the older UIWebView. Slow, but better ability to interact with the network layer. Not ideal, but at least it is possible.

So to answer your question: We would have to replace WKWebView in Firefox for UIWebView. We've been very close to doing this in some form. But it is is big compromise in terms of functionality and stability. So I am not sure when and in what form that will happen.

Stuck between a rock and a private API.


There is a way to interact with the network latyer even when using WKWebView. Since iOS9 there are the Network Extension APIs which allow you to access (and modify/filter) raw packet data.

For example: https://developer.apple.com/reference/networkextension/neapp...


Yeah we know these things exist. I just don't think using a VPN or a global Network Extension or a global HTTP interception is a good solution. It would be a workaround.

We need a real solution. We need better WKWebView APIs. The requests are known. The bugs have been open since iOS 8. Two years.


That's pretty ridiculous for Apple, I understand they make it for safety purposes but they can't deny it also gives them an unfair software advantage. Kind of like old Microsoft and it's private undocumented APIs.


Is either able to use JIT for JavaScript engine or is it only enabled for Apple's "blessed-process" iOS Safari?


Only the WKWebView gets fast JavaScript. Any app that uses it will inherit that functionality.

For example, Firefox for iOS ranks exactly the same as Safari in speed benchmarks.


WKWebView executes out-of-process just like Safari and so it performs just as well. In fact, that's the whole reason that WKWebView exists (instead of just using UIWebView).


Thanks for explaining this in simple terms. I have been curious about this for a while.


This looks really good!

Not sure if this is worth opening an issue over, but are you planning on supporting search engines other than google?


Due to time constraints we could not go beyond the defaults that we currently have. We have a bug open to allow people to select an alternative search engine: https://bugzilla.mozilla.org/show_bug.cgi?id=1318359


+1

Seems like Duck Duck Go would fit well with what seems to be your mission with this project.


I only see it supporting yahoo. I didn't try very hard but in the settings there is no way to change it from yahoo, which is really frustrating. Did I overlook something?


For now, the search engine depends on your locale. Mozilla has partnerships with different search engines in different geographies.

https://github.com/mozilla-mobile/focus/blob/49bda35aa3b9b9b...


oh wow, thanks.


The submission describes an app, yet the readme here describes a content blocker. Is this the correct repo?


The app works as both, providing a blocker for Safari, and a browser when you open it directly.


Yes, we did not update the README yet. Our focus (ha ha) was on code. Will do soon. You got the right repo though. Contributions are always welcome.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: