News for hackers. Stuff that matters.
Re:Open-sourcing Chrome on iOS by cptskippy on Tuesday January 31, 2017 @02:25PM (#13534262)
> Google does the same thing with Android

How so? They have no restrictions on web browser development. Firefox has been there and I use it as my daily driver. Since KitKat, Android System WebView has been an app on in the Play Store based on Chrome that gets updated regularly.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @02:28PM (#13534299)
Not to mention that Android also lacks a lot of restrictions that iOS has, JIT code = no problem, mono for android has many more features than the iOS one for that reason. You also don't have to use Google Cloud Messaging, you can do your own push notifications via IMAP, XMPP, etc. (Assuming you and your users are okay with pushing an 'okay I'm willing to sacrifice some battery life for this' button). Mapping components that use OSM are freely available, etc.

Heck, you don't even have to use their phone app, you can install a SIP client. It's perfectly possible to use Android as it exists in AOSP without Google stuff at all. Some 3rd party apps may want to use things like Google Maps embedded, but there are projects that replace those and an Xposed module to fake the signatures to match. The Google-less Android system is really a decent experience if you're willing to put the work in to it.

Re:Open-sourcing Chrome on iOS by madeofpalk on Tuesday January 31, 2017 @04:05PM (#13535219)
> Assuming you and your users are okay with pushing an 'okay I'm willing to sacrifice some battery life for this' button

This is the fundamental difference in philosophies behind Android and iOS.

Apple likes to build their software (most of the time) like Python - its an opinionated platform that strives to make that best decisions for users. They've determined there's very little user benefit from having multiple push notification services, and they don't want to give users a way to shoot themselves in the foot by enabling such a setting that would impact battery life like that.

Many of Apple's decisions can be viewed through that lense.

Re:Open-sourcing Chrome on iOS by maxsilver on Tuesday January 31, 2017 @04:27PM (#13535411)
> Apple likes to build their software (most of the time) like Python - its an opinionated platform that strives to make that best decisions for users.

I'd argue it's a platform that strives to make best decisions for Apple, and that's not the same thing as being opinionated.

Yes, there's an argument that there is very little user benefit from having multiple push notification services. But there's no inherent benefit to having Apple's service be the one-and-only service ever allowed to be used -- that's not an opinion, that's vendor lock-in.

There's an argument that there is benefit in not having multiple different web browsers on a user's phone. But there's no benefit to having Apple's webkit be the one-and-only web browser ever allowed on the phone -- that's not opinion, that's vendor lock-in.

There's nothing inherently wrong with a product holding strong opinions. But vendor lock-in is not the same thing as an opinion -- there is a clear difference between an opinionated product, and a monopolized one - https://en.wikipedia.org/wiki/United_States_v._Microsoft_Cor....

Re:Open-sourcing Chrome on iOS by budde on Tuesday January 31, 2017 @08:38PM (#13537367)
> Yes, there's an argument that there is very little user benefit from having multiple push notification services. But there's no inherent benefit to having Apple's service be the one-and-only service ever allowed to be used -- that's not an opinion, that's vendor lock-in.

Let's suppose Apple were to open up their APIs to allow other services to send push notifications to their devices. Since they are no longer the intermediary they've given up control on how often a developer's servers are sending notifications via the third party, they've lost a control on throttling how often notifications are sent to devices. What happens if the push service or the developer's backend is compromised (or misconfigured) and attempts to send hundreds of push notifications per second to thousands of phones? Features could be added to the OS to help mitigate this but the phone must still service the incoming traffic. Strictly speaking, this isn't Apple's fault but this won't be a sufficient answer for their customers.

Which isn't even considering that they need to figure out a secure mechanism for allowing third parties to uniquely identify iPhones.

> There's an argument that there is benefit in not having multiple different web browsers on a user's phone. But there's no benefit to having Apple's webkit be the one-and-only web browser ever allowed on the phone -- that's not opinion, that's vendor lock-in.

What happens if Mozilla, Google, etc. release a new browser engine for iOS with all the latest whizz-bang HTML features but at the cost of doubling power consumption? Apple support needs to deal with the customers who suddenly see their battery life plummet when switching to a new browser. 99 customers out of 100 will blame Apple for this. What if a vulnerability allowing RCE is discovered in the JIT code included in the third party browser? Apple has lost control of the patching cycle and their only recourse would be to remotely remove the browsers from their customers' phones if the vendor does not update the app in an acceptable timeframe.

I feel like a lot of Apple's decisions around the iOS ecosystem can be explained by looking at the problems they had with customers running Adobe Flash on the Mac.

Re:Open-sourcing Chrome on iOS by kartickv on Wednesday February 01, 2017 @05:44AM (#13539725)
> What happens if Mozilla, Google, etc. release a new browser engine for iOS with all the latest whizz-bang HTML features but at the cost of doubling power consumption?

What if I use an email app or notes app or other app that consumes twice the power of Apple's inbuilt app?

I don't see what's special about a web browser. It's just another app.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @04:13PM (#13535287)
> They've determined there's very little user benefit from having multiple push notification services, and they don't want to give users a way to shoot themselves in the foot by enabling such a setting that would impact battery life like that.

Well, I'm the user and I've determined that I'd rather not send private data through their servers, that I'd rather be able to do things like run a proper IMAP, XMPP, SSH or SIP client on my device without disconnections, etc. Those seem like pretty major use cases to me, ones which Apple shouldn't be making decisions for the user about.

If I ran an Apple device I couldn't use SIP and I'd be required to pay 4x as much for a phone plan rather than using a cheap data-only tablet plan for example. That seems prohibitive to say the least...

Re:Open-sourcing Chrome on iOS by madeofpalk on Tuesday January 31, 2017 @04:27PM (#13535404)
Yup. That's fine. Apple's made an opinionated decision (which IMHO probably suits the masses). If you want to make a different decision and don't want Apple to handle your notifications you can disable push notifications system wide, or switch to another platform.

This is of course ignoring that the user doesn't get much of a say in what push notification delivery mechanism is used - that's up to the developer.

But, to be honest, if you don't trust Apple to handle your push notifications then I doubt you would trust them to do much else, and you should choose another platform.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @04:35PM (#13535467)
> that's up to the developer

Most of the time my concern isn't with apps that have a dedicated service backing them, but with apps which don't. I don't want Apple notifying me when something changes on my SSH session because I sent my SSH credentials to some 3rd party server that notified Apple to notify me.

I trust absolutely no one to handle those credentials properly, I need my device to do it. And I need it to do it by interacting directly with the server.

Re:Open-sourcing Chrome on iOS by bennyg on Tuesday January 31, 2017 @07:25PM (#13536905)
Then iOS isn't for you. I feel like this is a weird argument.
Re:Open-sourcing Chrome on iOS by budde on Tuesday January 31, 2017 @08:39PM (#13537374)
As a user, I trust Apple far more with push notifications than I would a third party.
Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @09:55PM (#13537788)
Think about what you're saying more.

Android solution: You own the server. Your server pushes directly to you.

iOS solution: No ability to maintain SSH connections, instead you need to get a 3rd party app to open an SSH connection for you and send you a push notification via an Apple service when a change occurs.

See the problem? Trusting Apple alone isn't an option - Apple doesn't offer a service to send you a push notification for your SSH session. You need to involve a 3rd party.

Re:Open-sourcing Chrome on iOS by MBCook on Tuesday January 31, 2017 @10:21PM (#13537925)
That's the way you see it, how about the way I see it?

iOS solution: everything goes through Apple, I generally trust them and know that they try to look out for me.

Android solution: every app goes through someone else's server, every app needs individual vetting because I have no idea what they're doing or how hard they're trying with their privacy. Where is the trying at all. That's the way you see it, how about the way I see it?

iOS solution: everything goes through Apple, I generally trust them and know that they try to look out for me.

Android solution: every app goes through someone else's server, every app needs individual vetting because I have no idea what they're doing or how hard they're trying with their privacy. Or if they're trying at all.

I like the iOS solution. You have it framed for my developer point of you, and I can understand that. But from your point of you, your solution has a lot of potential issues around privacy alone.

Re:Open-sourcing Chrome on iOS by Yetanfou on Wednesday February 01, 2017 @03:08AM (#13539191)

   iOS solution: everything goes through Apple,
...ka-ching! says the cash register at Apple...

   I generally trust them...
...ka-ching ka-ching!...

   and know that they try to look out for me.
...ka-ching ka-ching ka-ching...

Apple looks out for their bottom line. If your interest happens to cross that path, bummer.

Don't just assume a commercial interest 'looks out for you' because they don't. If your needs, or at least your perceived needs (due to effective marketing) fit with a company's strategy you might get the idea that said company does it all for you and your fellow users. This does not imply any causality, the company just does what it thinks is best for its bottom line. As long as a company serves the needs of its users they are in a position to do well. Vendor lock-in serves companies in that they have more freedom to choose their own path without bothering all that much about whether that path coincides with their users' needs as those users face a steep cost if they choose to change vendor. As long as the company keeps the extra costs - in money, limited features or usability - lower than what it would cost a user to switch vendor they stand to gain from this strategy.

Re:Open-sourcing Chrome on iOS by Accacin on Wednesday February 01, 2017 @05:20AM (#13539641)
I mean, what he said is true. Look how many rogue apps on Android start spamming you with notifications and even worse, apps that push notifications that are purely advertising. Since I switched to iOS this hasn't happened once, and I'm prompted on first use of the app if I want to allow notifications or not.

You honestly believe that Google don't look out for their bottom line either?

Re:Open-sourcing Chrome on iOS by Yetanfou on Wednesday February 01, 2017 @08:15PM (#13547192)

   You honestly believe that Google don't look out for their bottom line either?
I did not mention Google, nor any other company (other than Apple) for that matter. Instead I used the words 'a commercial interest' to indicate this goes for _any_ company which exists to make money - and that means nearly every company in existence.

But, to get back to your Google example, of course Google looks out for their bottom line. It just so happens that Google is not nearly as aggressive in herding their users into fenced corrals as Apple is. Google moves fast and often discontinues services so it is unwise to base your (company's) future on the existence of any specific Google service. Fortunately Google generally makes it easy to get data out of their services so a viable exit strategy is usually feasible. Apple is not that fast a mover which also implies they don't discontinue services at the rate at which Google does. Where Apple fails miserably is in their support for migrating data out of their services. This, again, fits the description I gave at the start of this sub-thread: Apple wants to raise the cost of leaving their services.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @11:53PM (#13538365)
For the most part thought the Android solution matches the iOS solutions there though, devs use GCM. You're however missing the part where app devs have their own servers that have to talk to Apple or Google. You have to trust those 3rd parties too, all Apple or Google does is get notifications from their servers to your phone.

I'm not talking about general push notifications though, nor am I speaking as a developer. I'm speaking as a user, who also wants to connect to ssh, imap, xmpp and sip. The standard Apple/Google model is fine for most push notifications but absolutely not for things like this where a direct connection to a server is something that you as a user want.

That's the part I'm complaining about, not the general push message system, but the system of not being able to keep a persistent connection to a SIP or IMAP server without giving my credentials to a 3rd party so they can handle push and forward that off to Apple or Google.

Re:Open-sourcing Chrome on iOS by geofft on Tuesday January 31, 2017 @04:29PM (#13535426)
> I'd rather be able to do things like run a proper IMAP, XMPP, SSH or SIP client on my device without disconnections, etc. Those seem like pretty major use cases to me, ones which Apple shouldn't be making decisions for the user about.

I learned recently that this isn't just a matter about the OS vendor making decisions, but that the OS vendors negotiate with the cell providers for longer timeouts:

https://github.com/WhisperSystems/Signal-Android/issues/1000...

"The advantage GCM has is that Google has made agreements with mobile carriers not to timeout connections on those networks. Without those, websocket connection idle timeouts on mobile data connections will be unpredictable, and they tend to be more trigger happy (and also often just silently close without sending an RST)."

So, if you want to run a proper IMAP (IDLE, I assume) or XMPP or anything client, you'll need to negotiate with your cell provider for better timeouts.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @04:31PM (#13535442)
> So, if you want to run a proper IMAP (IDLE, I assume) or XMPP or anything client, you'll need to negotiate with your cell provider for better timeouts.

Or just send TCP keepalives and accept worse battery life. I still get enough to get me through a day with my phone almost never sleeping fully due to all the shit I have connected constantly.

Also, note that that comment is completely unsourced - I'm curious if there's any evidence backing that or it's just bunk. It wouldn't surprise me, but I also don't see any references to that anywhere else. Moxie is known to hate the 3rd party app stores and stuff, so it might just be him bullshitting about a possibility.

Re:Open-sourcing Chrome on iOS by foodstances on Wednesday February 01, 2017 @12:26PM (#13542721)
You can use SIP on iOS:

https://developer.apple.com/reference/callkit

You can also push notifications to your device in an end-to-end encrypted manner. iOS 10 supports notification extensions so your private app extension can receive the encrypted payload, decrypt it, and then present a normal notification.

Re:Open-sourcing Chrome on iOS by Touche on Tuesday January 31, 2017 @04:27PM (#13535407)
Yep, Apple's decisions are all about helping the user. The fact that they also make Apple more money is a total coincidence.
Re:Open-sourcing Chrome on iOS by hk__2 on Tuesday January 31, 2017 @05:46PM (#13536100)
"Making features in order to have happy customers and so drive sales" is not exactly the same as "Making features to make money".
Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @06:56PM (#13536677)
But it's also distinct from making "features" to control your monopoly.
Re:Open-sourcing Chrome on iOS by MBCook on Tuesday January 31, 2017 @10:23PM (#13537933)
You're right. It does make apple more money. I don't even think it's a coincidence.

Because people could use whatever web browser they wanted and tons of people experienced 3-5 hour battery life, I imagine a lot of them would ditch iOS thinking that the iPhone was the problem.

And Apple would lose money.

There are some things Apple does that are very blatantly self-serving. I think there's are VERY reasonable explanations for this one (power usage and security being two).

Re:Open-sourcing Chrome on iOS by Touche on Wednesday February 01, 2017 @07:58AM (#13540332)
You can't make claims like that without backing them up. I need evidence that Firefox Android users are experiencing 3-5 hour battery life.
Re:Open-sourcing Chrome on iOS by lucb1e on Tuesday January 31, 2017 @05:51PM (#13536155)
> You also don't have to use Google Cloud Messaging

Unless you want Signal, which everyone (rightly) recommends. Finally off of almost every Google service, wanna install the latest and greatest encrypted chat app... too bad. But I recently heard Signal is finally working on it (after they closed my Github Issue as wontfix/by-design a year or two ago).

Re:Open-sourcing Chrome on iOS by kuschku on Tuesday January 31, 2017 @03:23PM (#13534835)
> (Assuming you and your users are okay with pushing an 'okay I'm willing to sacrifice some battery life for this' button)

That doesn’t work in Marshmallow, due to a bug, even if the user opts out, it will still disable the app during Doze.

The bug has been fixed in later versions, but you as a dev obviously can’t just leave a huge share of your users without working push notifications.

Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @03:26PM (#13534864)
I'm running marshmallow and I use SIP constantly - is this fixed in CM? Because as far as I know I haven't had any issue here, could just be that my phone doesn't Doze for another reason though.
Re:Open-sourcing Chrome on iOS by kuschku on Tuesday January 31, 2017 @03:29PM (#13534892)
SIP works, but excepting a native app from Doze doesn’t. For example, if an app has its own push notification system, even if it is whitelisted, it will be terminated during doze.
Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @03:32PM (#13534909)
I'm unable to find any reference to this issue on Google. Is it device or ROM specific perhaps?

Surely another constant connection like SIP would also be terminated, no? I don't see how that would differ from another push notification system.

edit: to be clear I'm using a 3rd party SIP client (Bria), which I have indeed excepted via this method.

Re:Open-sourcing Chrome on iOS by kuschku on Tuesday January 31, 2017 @03:47PM (#13535043)
No, but this is a bug, confirmed by Dianne Hackborn on G+
Re:Open-sourcing Chrome on iOS by problems on Tuesday January 31, 2017 @03:51PM (#13535084)
Are you referring to https://code.google.com/p/android/issues/detail?id=193802 perhaps?

This was fixed at https://android-review.googlesource.com/#/c/221708/ and probably merged into many custom roms generated since. It also only occurred under fairly specific circumstances.

EDIT: Yup, https://romhut.com/versions/cm-13-0-20160508-v8-0 indicates it's been in CM for a while, which is probably why I haven't experienced it. Dianne Hackborn fixed this as far back as November 2015, it might have made it into 6.0.1 on some devices too, though I could be misreading.

Re:Open-sourcing Chrome on iOS by kuschku on Tuesday January 31, 2017 @05:01PM (#13535678)
Yup, it got fixed on some devices, but the Nexus 5, for example, never got the fix.

This leads to the problem that you, as a dev, either have to leave a huge amount of users without working push notifications, or use GCM anyway.

Re:Open-sourcing Chrome on iOS by pjmlp on Wednesday February 01, 2017 @04:24AM (#13539483)
They forked Java by cherry picking features and APIs, and are making it increasingly difficult to write portable code across standard Java and Android Java.

Any Java library that depends on Java 7 or 8 standard libraries not available on Android, newly introduced JVM bytecodes, some of the Java 8 language features, annotation processors, ... isn't usable on Android.

Good luck getting Java 9 modules, or eventually Java 10 value types and updated generics when they become available.

Re:Open-sourcing Chrome on iOS by evv on Tuesday January 31, 2017 @02:28PM (#13534312)
Almost none of the following APIs are available to web applications on Android:

https://developer.android.com/about/versions/marshmallow/and...

Edit: I'm getting down-voted, presumably because people think web apps should have different capabilities than native apps. To those responding this way: why? I can't imagine why you'd prefer the locked-down app distribution channel of the Play Store, in comparison to the open web..

Re:Open-sourcing Chrome on iOS by cptskippy on Tuesday January 31, 2017 @02:41PM (#13534438)
I think there's a distinction between an HTML App like those made with PhoneGap/Cordova and a Web Application like Gmail.com. And I personally don't think that's a bad thing to restrict most of those APIs from Web Applications. Do I want or need a webpage to be able to turn my Camera Flash on and off? Nope Nope Nope.

I think a lot of the newer APIs being exposed to the Web via the Browser are not very well thought out and will eventually be removed because of the risks they present.

Re:Open-sourcing Chrome on iOS by CaptSpify on Tuesday January 31, 2017 @05:42PM (#13536068)
Personally, I think if Android had a better permissions setup then I'd be happier with being able to control those options, but I agree.
Re:Open-sourcing Chrome on iOS by threatofrain on Tuesday January 31, 2017 @02:42PM (#13534451)
Asking ignorantly here -- are you saying that those API's are accessible to Google Chrome and not to other browsers? That Google is playing in an unfair playing field?
Re:Open-sourcing Chrome on iOS by gcp on Tuesday January 31, 2017 @02:48PM (#13534516)
are you saying that those API's are accessible to Google Chrome and not to other browsers

Those APIs are available to all Android apps, including other browsers. The only complaints I've heard are about Push-style APIs and power saving essentially forcing you to use Google Services.

Re:Open-sourcing Chrome on iOS by cptskippy on Tuesday January 31, 2017 @03:21PM (#13534815)
Yeah that's actually a good point. There is no assurance that your App's Service component will remain active and GCM is the only way to reliably push to an Android device.

However you can write an App that persists in the App Tray as an icon that could maintain the App's Service component. The drawback there however is the persistent notification.

Re:Open-sourcing Chrome on iOS by kuschku on Tuesday January 31, 2017 @06:34PM (#13536522)
> The drawback there however is the persistent notification.

Well, the actual drawback is that you end up with over a dozen such notifications, your entire UI is full with them, and there’s no way to get rid of them, even if you developed the apps yourself.

Re:Open-sourcing Chrome on iOS by pgeorgi on Wednesday February 01, 2017 @10:18AM (#13541316)
Developers could band together, build one such app that does the communication part and forwards any incoming message to the right destination using intents. (ie what GCM does)

On the phone they could then look if GCM is around (and use it) or if that other notification app is around (and use it) or propose to install said app. It's negligible in terms of user confusion because people on non-GCM systems likely know what they're getting into (except for those using Amazon Fire).

Re:Open-sourcing Chrome on iOS by kuschku on Wednesday February 01, 2017 @12:56PM (#13543089)
That still wouldn’t solve the problems of many open source devs.

I, for example, develop an app connecting to servers that the users self-host.

I can’t modify the server, nor can I easily get it to send notifications.

But I want to be able to show notifications.

Luckily I can open a port to it and wait for them.

It’s impossible to solve with GCM.

Re:Open-sourcing Chrome on iOS by pgeorgi on Saturday February 11, 2017 @03:12AM (#13621695)
XMPP supports that, so it should be possible to provide an optional extension to your protocol to do likewise.

http://xmpp.org/extensions/xep-0357.html