Live data from Hacker News

Electron apps cannot be submitted to the Apple store

david.dev

431–440 of 441 posts

Re: Electron apps cannot be submitted to the Apple store

#431
post #43

If Apple doesn’t want third party apps calling private APIs why don’t they simply run third party apps in a sandbox that doesn’t have them exposed?

Because the private APIs are used by frameworks that are loaded into the same process as the application.

Sorry, can you explain further? I haven't done any mobile development so if you have some resource I can learn more from I would really appreciate it.

Re: Electron apps cannot be submitted to the Apple store

#432

Earlier quoted context omitted.

Who do you imagine is responsible for making sure your app doesn’t contain malware? The only answer is that as a developer, you are responsible. Yes, we have to make calculated risks. But the buck stops at you. There is nobody else who can take responsibility for the contents of your app.

you simply notarized the app and you know that there is no malware. Also we are talking about ElectronJS and Chromium -- not exactly untreatable sources. Note that apple does check for malware and quality on the upload stage itself (now done via transporter) so it wouldn't even make it to then review state if something is dodgy.

Apple can’t magically tell that there’s no malware in an app you upload. There is no automated scan which can detect all security vulnerabilities or back doors in code. And we’re talking about electron plus hundreds to thousands of npm modules - which contain who knows what.

If you pull in some bad modules, directly or transitively, and as a result your app steals my data or worse, that’s on you for shipping malicious code to my computer. There is no one else who can be responsible for that. Not Apple. Not the user. You.

Re: Electron apps cannot be submitted to the Apple store

#433
post #185

Earlier quoted context omitted.

As opposed to "here are some APIs that you can't use but we can, neener neener"?

You are assuming that these Apple APIs are used to give Apple a competitive advantage somehow. From what I can tell, these specific APIs don't. What they do give Apple an advantage in ironically is in forcing more developers to develop using (Apple) native APIs. The CA prefixed ones are core animation related. Some of the others appear to be drawing frame related. I am not sure what the remote one does. None of these…

I was wrong about some of them being drawing frame related. See https://www.cocoawithlove.com/2008/12/drawing-custom-window-.... Apparently customizing the window frame. The CA prefixed ones are correct. Apparently, at least on a Mac, it was more about battery than performance (at least for what Mozilla did) but it was still about the amount of work they were doing per frame (for Mozilla).

Re: Electron apps cannot be submitted to the Apple store

#434
post #27

Earlier quoted context omitted.

Wouldn't a more reasonable path be for Apple to talk directly to Electron and Chromium about the issue and work out a path forward before rattling a banhammer at app developers, though? I mean, did Electron or Google just refuse to fix this? Are these private APIs things that actually get exercised in the apps being threatened? It's not so much about culpability or Apple's right to control their app deployment enviro…

Why? It’s very clear what’s wrong. Don’t use private APIs. Thank you Apple for keeping things clean!!

Chrome and Firefox are using a critical feature that has no equivalent public API. If they didn't then they would end up using 3x as much energy which is important for the battery life of laptops and phones.

Re: Electron apps cannot be submitted to the Apple store

#435
post #423
post #268

Earlier quoted context omitted.

Yes, this is the thing. The option isn't electron vs native, it's electron vs nothing.

There is literally no reason to distribute an electron app when you could simply run it as a web server using `npm start` and navigate to ` http://localhost:[port number]`. Electron is born out of a misplaced notion that some apps are "special" and deserve a certain extra percentage of the users' CPU cycles and battery life for a spot in a user's system tray. 10% of a user's battery life multiplied by all their elect…

I once used this pattern and implemented the webserver using C++. It was quite interesting that I could read gigabytes worth of files and run a sqlite database in the same process and still not exceed 3MB of RAM. Of course the tab in the browser used a lot more RAM (maybe 25MB) but browsers can suspend or simply close tabs. With regular applications the GUI would always be loaded in memory.

Re: Electron apps cannot be submitted to the Apple store

#436
post #423
post #268

Earlier quoted context omitted.

Yes, this is the thing. The option isn't electron vs native, it's electron vs nothing.

There is literally no reason to distribute an electron app when you could simply run it as a web server using `npm start` and navigate to ` http://localhost:[port number]`. Electron is born out of a misplaced notion that some apps are "special" and deserve a certain extra percentage of the users' CPU cycles and battery life for a spot in a user's system tray. 10% of a user's battery life multiplied by all their elect…

I once used this pattern and implemented the webserver using C++. It was quite interesting that I could read gigabytes worth of files and run a sqlite database in the same process and still not exceed 3MB of RAM. Of course the tab in the browser used a lot more RAM (maybe 25MB) but browsers can suspend or simply close tabs. With regular applications the GUI would always be loaded in memory.

The reason why this pattern isn't used more commonly is the fact that right now web browsers simply aren't designed to be used this way unless you start a new instance for just a single app. The second reason is that electron developers are lazy. They only want to test a single browser (or browser version) and are perfectly happy that this means Google can get away with shady things.

Re: Electron apps cannot be submitted to the Apple store

#437

Earlier quoted context omitted.

I feel Apple is moving into somewhat dangerous territory. If the intent, as documented by internal messages and emails, is purely to protect the consumer by forcing people to use only public APIs, that's one thing. But, if Apple is trying to apply anticompetitive behavior against certain technologies, if this rule is selectively enforced, if there is any bad smell or anything dirty about this process, then Apple is i…

This is nothing new, developing iOS and MacOS apps you use public APIs and never use private ones. I have never had any desire or need to use something not documented/public in anything I have built. You'd have to be pretty dumb to depend on something that Apple can and will change whenever they want. When I worked at Apple 25 years ago I remember the source code to the old MacOS was riddled with "if Word version 4.0…

Valid points. My worry is if this is being exercised inconsistently. Is the same rule applied in the same way to everyone? Even Apple granting itself exceptions isn't great -- and I know it does grant this exception to itself -- but if it grants exceptions to some third parties but not others, or does not faithfully and consistently enforce the rule for everyone, that would be extremely troubling.

Re: Electron apps cannot be submitted to the Apple store

#438

Earlier quoted context omitted.

as CTO I know all the dependencies in the application stack of our company and I require developers to have sufficient understanding of their purpose, licensing model etc. There are tools to simplify this task. It’s much harder to do for TypeScript than for Java, mostly because NPM ecosystem is a huge pile of junk, but it’s still important part of developer's job.

How much time does it take to read through the millions of lines of code?

Usually you don't write a project and then sit down to read through all dependencies, but it's a process that happens when you do add a dependency.

So, the process would be something like: have a problem that a library might solve, find a library that could solve the problem, verify it can solve the problem, look through the implementation, look through it's dependencies, then actually include it in the build. If anything doesn't look nice at each step, rollback and find something else or start writing your own implementation.

Do this from beginning of the project and you'll always have a full understanding of the system.

Re: Electron apps cannot be submitted to the Apple store

#439
post #52

Earlier quoted context omitted.

Apple just rebuilds any popular app and makes it first party anyhow. At some point most developers will stop bothering just for that.

Really? Can you link their Sketch and Photoshop replacements? I know some designers who could use those.

Apple doesn't rebuild apps that require massive features, but they do often build things into the OS or as base apps that negates the need for apps, some of them wildly popular.

Re: Electron apps cannot be submitted to the Apple store

#440
post #419

Earlier quoted context omitted.

Why not? Microsoft does it all the time. So does Google, to an extend. Apples inability to work with us is the primary reason we replaced thousands of iPads for school children with Chrome books. Eventually Apple caved to our needs, but it was way too late. Google were “what can we do to make this deal work for both of us?” from day one.

If a company is willing to do that, hooray! What I'm saying is that it's unfair to expect it. As in, if a company is not willing to bend over backwards for you, it's not fair to condemn them for that. It's totally fair to praise their competitors who will, though.

I wouldn’t mind I had options, but I don’t. Instead we’re the ones to bend over backwards, as you put it, because Apple has a monopoly that we’re required to use.
Post reply on HN