News for hackers. Stuff that matters.
Re:Electron apps cannot be submitted to the Apple store by outworlder on Sunday November 03, 2019 @06:27PM (#21437515)
> I did write back to Apple trying to explain that I am using Electron and I can't really change any of these public-framework usage

Yeah. So? By linking a framework that's using private APIs, this becomes your problem now. And Electron's problem, by extension. Go bug them, not Apple.

Re:Electron apps cannot be submitted to the Apple store by kjksf on Sunday November 03, 2019 @07:12PM (#21437761)
How short are memories.

I remember how Microsoft was vilified for supposedly having secret Windows APIs that allowed Microsoft apps to get better performance.

That was mostly made up and even if such APIs existed, any program could have used it.

Even at the height of corporate arrogance Microsoft didn't dream of banning developers for using undocumented APIs.

Apple seems intent on becoming more evil than Microsoft ever was.

At some point the goodwill they built as underdog making great products will run out and some government somewhere will take an anti-trust action.

I'm just hoping it'll happen sooner rather than later.

Re:Electron apps cannot be submitted to the Apple store by analog31 on Sunday November 03, 2019 @10:50PM (#21438879)
From what I recall, this practice goes back to the original 68k Apple Mac.

The prehistory is that developers for the Apple ][ had access to third party documentation, and made extensive use of unofficial system variables and entry points. The result was that it became impossible for Apple to update their own system without breaking popular apps and getting blamed for doing so. It turned Apple ][ technology into a dead end.

The Mac was intended to be a much more tightly controlled developer environment. And it came out at a time when there was still a lot of debate over the right way to develop a computing platform.

IBM had a different approach, which was to make things more open like the Apple ][, and they paid the price for it. For instance, a lot of the weird limitations of the IBM PC were caused by developers bit-banging hardware registers and video memory rather than going through "official" BIOS calls that were less efficient.

I don't personally know the right answer, but this is just the history as I recall it. At the time I preferred the IBM approach, because I could do some friendly bit banging and get stuff done, but my programs were mostly for a severely limited audience and lifespan. Today I try to do things in a way that insulates me from knowing anything about the platform that I'm using.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @06:52AM (#21440790)
The Mac was intended to be a much more tightly controlled developer environment. And it came out at a time when there was still a lot of debate over the right way to develop a computing platform.

This is very much not true. The entire extension mechanism on Macs was about using undocumented hacks to add functionality. Apple has no control over what a third party app could do through the Classic MacOS era from 1984-1999.

In fact, it wasn’t until around 2011-2012 when Apple started having sandboxing and that was only for Mac App Store apps. It was even later that they had system integrity protection. Even today, you can basically do what you want to on the Mac except for having unsigned kernel extensions.

Re:Electron apps cannot be submitted to the Apple store by DonHopkins on Monday November 04, 2019 @03:57AM (#21439940)
But Applesoft had perfectly fine extension mechanisms: "&" and "USR()" and "PEEK" and "POKE" and "CALL"! What more do you need?

https://link.springer.com/content/pdf/10.3758/BF03203836.pdf

https://en.wikipedia.org/wiki/Applesoft_BASIC#Extensions

http://nparker.llx.com/a2/as.addons.html

"C is just PEEK and POKE with syntactic sugar." -- Bill Joy

Re:Electron apps cannot be submitted to the Apple store by BillinghamJ on Sunday November 03, 2019 @07:22PM (#21437821)
Undocumented APIs get broken. That's a big problem for user experience, particularly if it happens to be being done by a framework relied upon by a very high percentage of app use. Seems pretty fair imo
Re:Electron apps cannot be submitted to the Apple store by DarkmSparks on Sunday November 03, 2019 @08:06PM (#21438072)
Is this why so many of the apps on my ipad "need to be updated to work with this version of ios"?

and there is no update.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @08:25PM (#21438173)
No, that's because they're 32-bit apps, which iOS no longer supports.
Re:Electron apps cannot be submitted to the Apple store by dingo_bat on Sunday November 03, 2019 @10:36PM (#21438829)
Which is the same thing.
Re:Electron apps cannot be submitted to the Apple store by ichicoro on Monday November 04, 2019 @05:53AM (#21440469)
It isn't? There's a difference between dropping 32bit libraries from your OS (after a lot of time in which Apple clearly said "we will drop support!") and banning for using unauthorized APIs inside the MAS.
Re:Electron apps cannot be submitted to the Apple store by babesh on Sunday November 03, 2019 @09:05PM (#21438379)
Microsoft was vilified for many anticompetitive practices.

I worked on an app that competed with a Microsoft app. Our app was actually winning in the marketplace. One year they release a new version of their app with some really cool features at the same time as the latest Windows release. Those features were based on some new APIs released with that version of Windows. Just gave their app a year leap.

Another evil practice was forcing PC makers to pay for a Windows license for each computer sold irrespective of whether the computer shipped with Windows.

Microsoft was pretty evil.

Re:Electron apps cannot be submitted to the Apple store by stickfigure on Sunday November 03, 2019 @09:14PM (#21438429)
As opposed to "here are some APIs that you can't use but we can, neener neener"?
Re:Electron apps cannot be submitted to the Apple store by babesh on Sunday November 03, 2019 @09:25PM (#21438480)
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 are giving Apple a direct advantage. I bet Electron tried to access to them to draw web pages smoothly.

The Windows API availability window gave Windows apps market advantages.

There are other private Apple APIs that do give Apple an advantage against app developers. Those advantages are in accessing physical hardware and possibly associated software, background processing, and integration (iCloud, etc...) But these aren't the bone of contention.

Re:Electron apps cannot be submitted to the Apple store by Mirioron on Monday November 04, 2019 @02:45AM (#21439655)
>None of these are giving Apple a direct advantage.

>I bet Electron tried to access to them to draw web pages smoothly.

How is this not a direct advantage? If these uncommented API calls provide a better performing solution than anything a third party can make then that is a direct advantage. Apps with that call could have a longer battery life or just run smoother.

Re:Electron apps cannot be submitted to the Apple store by piva00 on Monday November 04, 2019 @05:03AM (#21440234)
There is a very valid reason for an API to be kept private, if it's based on internals that are too hardware-specific and you don't want to break compatibility when/if you update the hardware (so a higher-level abstraction is needed and that is in the public API) is a very fair one. Core Animation might fall into that or it might not but it doesn't necessarily is a conspiracy to keep 3rd party apps in the mud.

When you consider that Windows has to keep backwards compatibility with applications from decades ago using whatever calls to Win32, to the point of keeping comments in the source code about why some call is done that way and shouldn't be changed then it's pretty fair that a company providing a platform wants to keep a tidy, secure (or at least following their guidelines for security/privacy concerns) public API.

The Java community had a huge debacle about `sun.misc.Unsafe`, it was a private API being abused by numerous libraries[0] and when its removal was announced there was a quite big backlash about its repercussions.

I don't think that Apple is evil because of its enforcement on private APIs, there might be other issues with this enforcement but there are very valid reasons to do it.

[0] https://blog.dripstat.com/removal-of-sun-misc-unsafe-a-disas...

Re:Electron apps cannot be submitted to the Apple store by babesh on Monday November 04, 2019 @09:36AM (#21441999)
Public core animation APIs on Apple hardware are plenty fast. I suspect the issue here is that web browsers are acting as yet another abstraction layer and thus are introducing more performance overhead. Electron is probably trying to squeeze as much performance as it can get or electron has a rendering cycle that makes it hard to have it not skip frames due to overhead. Best thing to do is to ask Electron devs.
Re:Electron apps cannot be submitted to the Apple store by babesh on Wednesday November 06, 2019 @01:06AM (#21460111)
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 by chii on Sunday November 03, 2019 @07:24PM (#21437831)
Microsoft didn't ban anyone for using undocumented private APIs because they couldn't, not because they chose not to.

Apple, or Microsoft for that matter, would do the same thing here, because the locked down platform is more valuable/profitable then an open platform.

Developed for Android - at least you can have your app sideloaded if the platform owner decided to remote you.

Or better, make your app a progressive web app. Don't use hardware api not available to the browser and you cannot be removed!

Re:Electron apps cannot be submitted to the Apple store by zamadatix on Sunday November 03, 2019 @08:37PM (#21438237)
> Microsoft didn't ban anyone for using undocumented private APIs because they couldn't, not because they chose not to.

Sure they could have, they had a code signing platform since the mid 90s and could have locked API access only to apps signed by them.

They didn't because it would have been pointless not because they couldn't figure out how.

Re:Electron apps cannot be submitted to the Apple store by lawnchair_larry on Sunday November 03, 2019 @08:50PM (#21438306)
Code signing does not do what you apparently think it does. They can’t block it unless it’s a windows store app/universal app, which is sandboxed. And that’s exactly what they do for those apps. Tim Sweeney ranted about this quite vocally!
Re:Electron apps cannot be submitted to the Apple store by zamadatix on Sunday November 03, 2019 @09:14PM (#21438430)
I never said code signing DID do that. Of course it didn't, there were no secret high performance Microsoft only APIs in the first place. I said it COULD have easily been used to do that. E.g. make special API/syscall to unlock restricted APIs, Windows checks the signing status of the executable making the call and only grants permissions if it is signed by MS.

It's actually also not true that Microsoft only ever blocked things based on signing cert from the Windows Store/UWP platform. Windows Defender Smart Screen blocked/blocks apps from running without user intervention unless it was either extremely well known or was signed (and even then if it was new you might still get caught by it).

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @10:37PM (#21438833)
> E.g. make special API/syscall to unlock restricted APIs, Windows checks the signing status of the executable making the call and only grants permissions if it is signed by MS.

This is how iOS works, FYI.

Re:Electron apps cannot be submitted to the Apple store by michaelmrose on Monday November 04, 2019 @01:20AM (#21439401)
I think perhaps your memory is short if you think that this is worse than anything Microsoft ever did. Did we forget them funding, to the tune of millions of dollars, a felonious pump and dump scheme designed to defraud investors and destroy competitors with fraudulent lawsuits.

In a completely fair world a substantial number of executives would probably be in jail.

Re:Electron apps cannot be submitted to the Apple store by matheusmoreira on Sunday November 03, 2019 @08:55PM (#21438328)
Apple wants to own the user's machine. They want to make it so their computers run only the software they approve. This is already true for iOS and it's only a matter of time before it also becomes true for macOS. It's the opposite of a free system.

Giving up software freedom for "ease of use" seemed like a fine deal at first but then Apple started making decisions that don't quite align with what neither users not developers want. Apple has already started taking advantage of their position as the gatekeeper of the platform.

Re:Electron apps cannot be submitted to the Apple store by ptlu on Sunday November 03, 2019 @11:30PM (#21439058)
As a user of macOS, I want developers who makes apps to use public APIs that will be supported so I don't get breakages on system upgrades or migrations.
Re:Electron apps cannot be submitted to the Apple store by matheusmoreira on Monday November 04, 2019 @01:57AM (#21439496)
It doesn't really matter if it's public or not. The fact is people are using those APIs and there's nothing that can be done about that. Nonchalantly breaking stuff and rejecting applications actively subtracts from the value of their platforms and could alienate developers.

Microsoft had private APIs and data structures too and it didn't stop developers from using them. However, their approach to that was different: they maintained bug compatibility with old software in order to keep stuff working. This is one of the main reasons why Windows remained relevant for so long.

The fact is Apple simply doesn't care about backwards compatibility. It's not just private APIs, public ones are also at risk:

https://lists.apple.com/archives/cocoa-dev/2019/Oct/msg00004...

It's not a new attitude either. Apple has always been like this:

https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...

> A lot of developers and engineers don’t agree with this way of working. If the application did something bad, or relied on some undocumented behavior, they think, it should just break when the OS gets upgraded.

> The developers of the Macintosh OS at Apple have always been in this camp. It’s why so few applications from the early days of the Macintosh still work.

> For example, a lot of developers used to try to make their Macintosh applications run faster by copying pointers out of the jump table and calling them directly instead of using the interrupt feature of the processor like they were supposed to.

> Even though somewhere in Inside Macintosh, Apple’s official Bible of Macintosh programming, there was a tech note saying “you can’t do this,” they did it, and it worked, and their programs ran faster... until the next version of the OS came out and they didn’t run at all.

Re:Electron apps cannot be submitted to the Apple store by Tepix on Monday November 04, 2019 @03:33AM (#21439864)
> The fact is people are using those APIs and there's nothing that can be done about that.

Apple is proving you wrong.

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Sunday November 03, 2019 @11:45PM (#21439111)
As a user of macOS, why don't you put the onus on Apple to not artificially limit what developers can offer you without it breaking on upgrades and migrations?

Some of the private APIs being used have been stable for generations and are clear improvements in one way or another over the publicly available APIs (like CAContext stuff). I mean a modern OS is not like a library you stick up on NPM and hope no one tries to use internal methods that you'll end up having to support. There are so many desperate teams working on OSX and the applications from Apple that use these APIs, it's not like backwards compatibility, documentation, and most of the issues public APIs face aren't already an issue that has to be tackled.

Apple uses these APIs to make features no one can fairly compete with, which is detrimental to you, as a user, and to external developers. Imagine if any app could use APIs like the ones that Apple Music uses to have tight integration with Siri, or that Apple Maps uses to show on your lockscreen.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @02:01AM (#21439507)
> There are so many desperate teams working on OSX and the applications from Apple that use these APIs, it's not like backwards compatibility, documentation, and most of the issues public APIs face aren't already an issue that has to be tackled.

When push comes to shove, Apple can tell those teams to rewrite their code. It can't do that to the authors of, say, Firefox.

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @06:04AM (#21440514)
What are you talking about?

They literally do it regularly, public APIs get deprecated then removed and consumers have to rewrite their code.

This article is literally about Apple making 3rd parties rewrite their code just to access the app store.

And before you or someone else points out "Firefox is directly distributed", I say: Exactly. So they can use the internal APIs as they please, then Apple can remove then as they please and break Firrfox and... make Firefox rewrite their code.

Apple is not Microsoft. Apple does not work towards not breaking existing software, they actively break it with each macOS and iOS release, sometimes not even releasing the tools needed to fix them before general releases

Making an internal API people are already using public literally does nothing but optionally allow Apple to give a heads up about deprecation. Apple could literally slap "public" on every internal API, break them every release, and the result would be no different than the current status quo because of the overarching rule of App Store admissions... your app has to work, regardless of if an "internal" or "public" API is changed.

Honestly for most developers that wouldn't seem to different from the current situation: see iOS 13 where basic UILabel stuff was breaking.

And again, apps that don't use the App Store already use internal APIs and can already break all the time.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @06:57AM (#21440817)
Apple rarely removes public APIs without any deprecation warning that appears when you compile your app at least one version ahead of time.
Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @08:09AM (#21441257)
Apple often straight up breaks the implementations of public APIs leaving developers scrambling to fix them. See modals in iOS 13, or title bar styling.

I work at a development agency and on both macOS and iOS every release is a race to figure out which breaking changes have been sprung by Apple (including crashes caused by silent changes in behavior of existing APIs, people have had apps rejected for breaking on pre-general release OS versions when we didn't even have the tools to test them yet)

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @09:30AM (#21441934)
There is a difference between breaking a public API which is a defect and that’s done unintentionally - that happens with every operating system and framework - and depending on private methods to behave appropriately.

Decades ago, when Apple introduced 68040 Macs, a lot of programs broke because they were writing self modifying code and that didn’t work with the 68040 cache. Whose fault was that Apple’s or the developers?

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @11:26AM (#21443119)
It is not a defect. It is literally intentionally broken! Do you actually know this space?

The modal example, it's to support new design language Apple is pushing, straight up breaks modals designed a certain (valid) way.

Catalina removed XML exports used by music apps. There was no deprecation warning.

Apple's recommended fix? Don't update if you need one of those apps.

These are not defects, they are literally breaking changes intentionally made with no warning.

I don't understand why all of you seem to be operating underthe assumption apps using "public APIs" just work with each OS update. It just doesn't work like that. They break and crash not due to defects but due to intentional changes

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @11:44AM (#21443372)
It was part of the first beta release that the new iTunes wouldn't support XML exports. So there was warning that it wouldn't work. Public API's doesn't mean "something will never change". It should mean that API's won't change between minor version numbers. The entire purpose of semantic versioning is that there might be major breaking changing when there is a major release.

Apple did in fact provide a method to share music between apps and some apps do take advantage of it. Do you really think that Apple didn't need to do a major overhaul of iTunes?

Of course it's Apple's advice and common sense not to upgrade your OS until the apps you use are updated to support it.

This is all modern software engineering 101.

As a developer there are a few expectations.

- depending on private method may break your code with any point release. The vendor has no obligation not to break code if you depended on a private API.

- If your code breaks calling a public method during a point release, it is a bug and the vendor has an obligation not to break public API's when releasing a point release.

- If the vendor makes a breaking change during a major release (x.0.0). It's the vendor's responsible to communicate the breaking change and give enough notice to developers/users about breaking changes so that either the developer can fix their code, the user can find a replacement app, and/or the user not upgrade.

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @12:25PM (#21443914)
You spent so many words to latch onto a single part of my entire comment, construct a strawman around it, and burn it down.

But lo and behold something useful did come of it, I finally found the fundamental misunderstanding keeping you from understanding what the crux of the issue is.

> If your code breaks calling a public method during a point release, it is a bug and the vendor has an obligation not to break public API's when releasing a point release.

Not when the vendor is Apple.

This whole time you've been operating on the set of rules that apply when your vendor considers you a partner of sorts, maybe in the vaguest sense of the word, but a partner nonetheless.

iOS point releases break things literally all the time. Iirc we actually saw more fires on 13.1 than 13.0

This literally has nothing to do with semantic versioning or whatever else you want to confuse it with. It's a blatant disregard for developers that Apple has carried throughout it's operations, from APIs to app store rejections. If anything the only reason they get the slightest pass is they're not Google, who manages to make talking to a human, no matter how hard they stonewall you, a selling point in mobile developer relations now.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @12:30PM (#21443967)
No one is going to argue that this entire release cycle hasn’t been a clusterfuck and the rapid release cycle of iOS/MacOS/watchOS this year is evidence of that.

But your argument has nothing to do with this submission - using private APIs.

At least one of your two examples - getting rid of XML exports - wasn’t about Apple breaking a public API during a point release. How is it a straw man refuting one of your major points? It was about Apple changing an API during a major release and letting developers know. This is how a vendor should behave.

Now whether they gave developers enough of a warning is a completely separate argument.

BTW: While it is a major change and no longer automatic. There is a manual workaround...

https://djtechtools.com/2019/10/10/update-to-catalina-heres-...

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @09:17PM (#21448988)
My point with that example was about how Apple doesn't treat developers as partners, something I said multiple times in my other comments is the crux of the issue, which this whole internal API in Electron rejection issue is simply a symptom of.

You ignored my perfectly good example of Apple breaking an API because you have nothing to say about it.

You ignored my comment you just replied to pointing out how irrelevant sem-ver is when your "vendor" doesn't care about you.

You are fixated on trying to nitpick the one tiny foothold you've found for your screed, one which only exists because you're ignoring the initial point I, not the article brought up, that this is an issue with Apple not caring about developers literally in the first comment you replied to.

Maybe spend more time reading and less time replying.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @09:25PM (#21449021)
You gave two examples - the one I know about “broke” with a major version release, was known during the beta period and is exactly how a platform vendor should behave. The only thing in question was the beta period long enough. The other you didn’t say whether it was a point release or an iOS 13 change.

The electron rejection is not a symptom of Apple breaking a public API. It’s just the opposite. An API change didn’t break Electron apps - it was rejected for using a private API.

It’s not “nitpicking” to point out that your examples are completely irrelevant to the submitted article - Apple rejected an app that used private APIs. None of your examples have anything to do with the submitted post.

Would you also complain if you wrote a C program that depended on documented “undefined behavior”...

  int b= a++ + ++a;
and it broke with the next version of the compiler or broke based on which optimizations were turned on? Yes I am sticking with examples of how irresponsible it is to depend on private APIs and undocumented behavior - something you advocated in other comments because that’s the entire point of the submitted article.
Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @10:23PM (#21449314)
Again you spend more time replying than reading.

I said this internal API rejection situation of Apple not treating developers like partners

Like it's literally right there in the comment you replied to clear as day and yet you manage to muck it up then spend several more paragraphs on a new screed nitpicking your wrongly quoted text.

I'm done replying to this.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Tuesday November 05, 2019 @02:17AM (#21450364)
The internal API rejection is about not treating developers like “partners”. You aren’t their partner. Internal APIs are just that - for internal employees.

It’s dumb to use “internal”, private APIs. It always has been. It hurts your products stability, it hurts your customers, and it keeps the platform vendor from making rapid changes.

Microsoft never cared about you as a developer - they would just as easily run over you if it met their business objectives.

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Tuesday November 05, 2019 @09:26AM (#21452587)
Ugh, I promised myself I'd stop replying, but I'll ignore most of this comment and correct some obvious misinformation for the benefit of other people who actually read comments.

Microsoft has a history from the earliest days of existence of bending over for developers.

Going as far as to literally to add a special case to their memory allocator to support explicit undefined behavior (reading memory after free) for when a specific game, Sim City.

They avoided writing more than 80 characters on any given line in system.ini, because one specific program would fail to read those lines correctly, then delete the system.ini when attempting to write it back

Microsoft is literally still packaging 16-bit subsystems with Windows 10

Anyone actually interested in learning more about it should read Raymond Chen's blog and learn about the truly insane lengths Microsoft goes to make sure they don't break what developers have done, no matter how wrong it is:

https://devblogs.microsoft.com/oldnewthing/author/oldnewthin...

Honestly anyone who doesn't know the lengths Microsoft goes to treat developers as partners doesn't have the base knowledge for the conversation this thread has been about, but I digress.

Re:Electron apps cannot be submitted to the Apple store by piva00 on Monday November 04, 2019 @05:06AM (#21440252)
Just like `sun.misc.Unsafe` was around for ages until it wasn't. [0]

[0] https://blog.dripstat.com/removal-of-sun-misc-unsafe-a-disas...

Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @06:13AM (#21440558)
I fail to see how this is anything but the perfect case for allowing internal API usage.

There was no other way to do what Unsafe did, so people used it for years.

A lot of people used it to do useful things in Java. So much stuff that this article is saying it literally became indispensable for much of what Java is used for. The ecosystem was better for it.

Sun says we want to remove it.

So Sun can provide alternatives that do the same job, or find that it generates so much value that it shouldn't be removed, or remove it and leave people literally exactly where they'd be if it never existed if there's no other way to do what it does. People would gnash their teeth, but the message sent is "Java was never the right tool for the job so we don't want you as a user."

And the article rightly points out, Sun was removing it for the sake of removing it. Having a bad engineering structure where that handwavy rant about Unsafe can justify removing a useful feature has nothing to do with internal vs public APIs.

Re:Electron apps cannot be submitted to the Apple store by piva00 on Monday November 04, 2019 @07:35AM (#21441022)
The usage of Unsafe was never encouraged, it is a problem that Sun never provided a public API with similar features but relying on a private API is what caused the issue of breaking changes in the future, something that every Java developer was well aware that could happen.

Yes, I agree that the problem was that Sun didn't provide a public API for it, at the same time developers breaking the contract (instead of pushing for it to be moved to a `java.` namespace) shouldn't be excused and embraced, it causes bigger issues to the overall design of the platform when then you have to be maintaining an API for the sake of usage, the same cruft that Win32 suffers for its whole existence, and which made developing on Win32 a pain in the ass for a lot of people, for the sake of not breaking some twisted way that a major application used it.

Re:Electron apps cannot be submitted to the Apple store by erichocean on Monday November 04, 2019 @12:28AM (#21439254)
> so I don't get breakages on system upgrades or migrations

This is hilarious, Apple breaks apps that only use public APIs on virtually every release they do, minor releases, security patches, you name it. Apple CONSTANTLY BREAKS THINGS.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @01:59AM (#21439499)
There's no need to shout; breakage in public APIs is nothing compared to private API churn. Plus you can file bugs about the former.
Re:Electron apps cannot be submitted to the Apple store by wutbrodo on Monday November 04, 2019 @02:23PM (#21445365)
It's very weird for me to see people acting like Apple is "becoming" anything. They've been pretty consistent about their spot on the user freedom/paternalism spectrum, for at least a decade. This is in line with the choices they've been making since at least the launch of the iPod. Ease of use has never been exclusive of user freedom, and Apple's desire to control users has never been about the user: any half-decent interface is capable of hiding power behind an easy to use facade.
Re:Electron apps cannot be submitted to the Apple store by matt4077 on Monday November 04, 2019 @01:33AM (#21439430)
Two stereotypes, each about a decade old. The rumors about the impending doom of freedom on MacOS is as old as Mac OS X. At this point, it's the slowest conspiracy in history.

People don't prefer MacOS because they are idiots who need "ease of use". There just is no other system developed with something approaching taste. Windows is for those people that put plastic covers over their furniture, ruining in the process of trying to protect it. Linux is for servers.

Re:Electron apps cannot be submitted to the Apple store by matheusmoreira on Monday November 04, 2019 @02:14AM (#21439555)
Apple is the company that already has a completely locked down mobile OS and is actively nurturing an app store for the macOS. I wouldn't bet on it running unsigned code forever.
Re:Electron apps cannot be submitted to the Apple store by vkoskiv on Monday November 04, 2019 @06:43AM (#21440741)
Apple has explicitly stated in WWDC sessions that there will always be a way to run unsigned code if you want.
Re:Electron apps cannot be submitted to the Apple store by scarface74 on Sunday November 03, 2019 @08:43PM (#21438266)
There are no such things as “secret APIs”. By definition an Application Programmers Interface is the vendors promise to other developers that when you call it, it will have well defined results no matter if the implementation changes. Every modern programming environment has the concept of public and private methods either enforced by the language (with hacks to get around it) or by convention (prepending a function with an underscore)

The fact is that all of MS’s Office competitors early on wrote horrible GUI apps whether it be fir Windows or the Mac.

Re:Electron apps cannot be submitted to the Apple store by JohnFen on Monday November 04, 2019 @01:24PM (#21444644)
> There are no such things as “secret APIs”.

I don't know what Apple means by "secret APIs", but I'm assuming they mean "undocumented APIs". Those are certainly real things that commonly exist.

> By definition an Application Programmers Interface is the vendors promise to other developers that when you call it

Yes, but those "other developers" may be other engineers in the same company. The APIs they use are still APIs, but are not intended for use by anyone outside the company.

Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @01:43PM (#21444884)
That’s true. Apple doesn’t say “secret APIs” that’s a conspiratorial phrase made up by third party developers.

Say Team A within Apple creates a module that is only to be used by Team B and C. Then Teams D creates a module that depends on Team A and B and they release a public API.

Team A should publish an internal documentation and Teams B and C should also not use methods that were not documented by Team A and Team A shouldn’t follow standard semantic versioning. If Teams B and C need some functionality they should inform Team A.

The same goes for Teams B and C. Also, Apple controls the release schedule for any internal teams. If they want to move to ARM tomorrow they can coordinate it within Apple without breaking any third party apps. The only team that has any responsibility to not break external developers is Team D.

If Apple starts allowing external developers to use private functions now their release schedule is tied to when enough major third party developers update their documentation.

Amazon is even a better example. They have a policy that everything should be a service internally and no team should reach “inside” of the implementation of another team.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:20PM (#21437802)
I believe CAContext is private API but performs better than documented alternatives.
Re:Electron apps cannot be submitted to the Apple store by shafiqissani on Monday November 04, 2019 @04:28AM (#21440072)
I trust the EU with these matters, more so than any other government.
Re:Electron apps cannot be submitted to the Apple store by scarface74 on Monday November 04, 2019 @07:02AM (#21440844)
So you expect the EU to not allow Apple to ban the use of private methods? Are they going to also ban Apple from not changing them?

What happens when Apple updates the operating system and starts throwing up a big dialog box every time an app accessed a private API that says “the publisher of this app needs to update their poorly written app.”?

What next? Is the EU going to also ban language makers from having public and private functions?

Re:Electron apps cannot be submitted to the Apple store by philwelch on Sunday November 03, 2019 @06:38PM (#21437574)
Exactly. An application developer chooses his dependencies and has to take responsibility for them. Even if the app store is going to let you pass the buck, it's going to make your customers unhappy.
Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Sunday November 03, 2019 @07:06PM (#21437720)
How is it going to make customers unhappy if your app isn't using the features?

Apple is within their rights here, but please, let's not pretend this is about user experience.

It's about the Apple machine doing what it wants, and rolling over who it wants, because it can.

That would explain why Apple developer relations (read: humans) had previously backpedalled after the same rejection in the past:

https://github.com/electron/electron/issues/20027

Most likely these rejections were not intentionally resumed, but because the machine that is app stores these days is completely non-deterministic, this could still be a big problem.

This time the wrong developer could reach out to the wrong channel and trip some sort of trap that turns this into a "known issue: won't fix + always send automated reply", instead of someone with the right connections getting to the right person and having them go and flip a switch that fixes everything with their pinky finger.

Re:Electron apps cannot be submitted to the Apple store by philwelch on Monday November 04, 2019 @12:50AM (#21439318)
It’s more of a general point that if your application is buggy, the customer isn’t going to give a damn whether the bug is in your code or in somebody else’s code.
Re:Electron apps cannot be submitted to the Apple store by BoorishBears on Monday November 04, 2019 @06:18AM (#21440581)
And? That's exactly why internal APIs should be allowed.

The problem isn't the usage of an internal API, the problem is the breaking of an internal API.

Which is already covered by App Store testing and guidelines which already require your app isn't a broken mess.

Re:Electron apps cannot be submitted to the Apple store by rdevnull on Sunday November 03, 2019 @07:19PM (#21437799)
this is exactly what they told me in the follow up message. I am somehow surprised how the bug in electron repository is not given much importance at all.
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:21PM (#21437809)
> I am somehow surprised how the bug in electron repository is not given much importance at all.

By Apple, or the Electron developers?

Re:Electron apps cannot be submitted to the Apple store by rdevnull on Sunday November 03, 2019 @08:09PM (#21438088)
after this post apparently the issue has been upgraded to a bug and someone is working on it. I hope they will find a solution OR at least let everyone know that they shouldn't bother creating MAS packages and upload the apple store. I think it is dangerous as it can get you banned.
Re:Electron apps cannot be submitted to the Apple store by vbezhenar on Monday November 04, 2019 @05:59AM (#21440486)
Apparently Apple silently whitelisted Electron for some time.
Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @06:54PM (#21437652)
This summarizes Apple's attitude to developers. Eventually, you'll run foul of some obscure nonsensical Apple policy, and Apple will not hesitate to show you the finger. And Shame you for your dev choices.
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:08PM (#21437739)
Calling private API is not nonsensical Apple policy, and you're reducing the instances in which rejection is nonsensical Apple policy.
Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @07:22PM (#21437822)
The post shot to #1 on HN in no time, because the developer community thinks this rejection, and it's backing policy to be nonsensical.
Re:Electron apps cannot be submitted to the Apple store by bdcravens on Sunday November 03, 2019 @07:40PM (#21437935)
The post shot to #1 because there are a lot of Javascript developers that see Electron as a gateway into apps they would otherwise be unable to develop. There's a lot of interest in whether or not that door closes.

Apple's policy towards private APIs has been known for years.

Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @07:47PM (#21437973)
In which universe is it good for Apple to roadblock JavaScript (or any other language) developers?
Re:Electron apps cannot be submitted to the Apple store by bdcravens on Sunday November 03, 2019 @08:07PM (#21438076)
You misinterpreted my comment.

Apple is roadblocking the use of private APIs, not languages. Or interpreted another way, they're roadblocking frameworks, not languages. This is true whether you're using Javascript, Swift, or C. This rule has been in place for years.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:26PM (#21437844)
> because the developer community

Which is not a homogenous group, both in ideals and for why they'd upvote a submission like this.

> this rejection, and it's backing policy to be nonsensical

They're different things. I personally think the rejection is perfectly sensical in the context of the backing policy, with which I don't fully agree.

Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @07:44PM (#21437952)
You must be chugging the koolaid to believe developers LOVE Apple's policies, or enjoy getting their hard-work rejected by a bot, or getting shamed by an overzealous Apple employee on HN. Developers are homogeneously unappreciative of Apple's treatment of them. They just don't have any leverage, or opportunity to negotiate
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:48PM (#21437975)
…you're replying to a comment where I state that I don't fully agree with Apple's policies.
Re:Electron apps cannot be submitted to the Apple store by scarface74 on Sunday November 03, 2019 @08:56PM (#21438335)
Who are you going to blame when applications start breaking because Apple removes or changes the functionality of a private function? [1] without warning?

When you are writing any software that has a public API you should feel no obligation to change the functionality or completely remove a private method without warning.

[1] I refuse to call it a private API. An API is public documentation of the inputs and expected behavior of a dependency. It should be a completely black box how that functionality is implemented.

Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @10:14PM (#21438725)
Blame the developer? Which is why, when an app breaks on the Mac store or app store, users pound the app with 1-star reviews. Even if the breakage happened from a platform (iOS or MacOs or Android) bug.

This is not Apple "watching out" for the developers, no matter how much you spin it

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @02:03AM (#21439513)
If enough applications break, users are more than likely to blame the "stupid Apple update" rather than their apps.
Re:Electron apps cannot be submitted to the Apple store by simonh on Monday November 04, 2019 @06:40AM (#21440723)
It's Apple watching out for users.
Re:Electron apps cannot be submitted to the Apple store by arvinsim on Sunday November 03, 2019 @08:36PM (#21438230)
Doesn't help that developers still buy their machines.

Apple will only listen if it hits their bottom line.

Re:Electron apps cannot be submitted to the Apple store by simonh on Monday November 04, 2019 @06:42AM (#21440736)
The problem is that flakey software on their platform, that breaks on OS updates and bug fixes annoys users, and thus also hits Apple's bottom line.
Re:Electron apps cannot be submitted to the Apple store by biggestdecision on Sunday November 03, 2019 @08:38PM (#21438243)
The rejection is legitimate, but it's still a big issue for developers of Electron apps. The fix should happen in Electron if at all possible.
Re:Electron apps cannot be submitted to the Apple store by jaimex2 on Sunday November 03, 2019 @07:13PM (#21437763)
Yep.

If you can't avoid Apple's stores then make damn sure you fall in line as they effectively own you.

Re:Electron apps cannot be submitted to the Apple store by saagarjha on Sunday November 03, 2019 @07:29PM (#21437861)
You can choose to distribute outside of the Mac App Store on macOS.
Re:Electron apps cannot be submitted to the Apple store by throwGuardian on Sunday November 03, 2019 @10:21PM (#21438764)
What about on iOS? And what about the fact that on MacOs notarization is more expensive than publishing to the store? I don't believe that to be a coincidence
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @12:25AM (#21439242)
Notarization is free.
Re:Electron apps cannot be submitted to the Apple store by LeoNatan25 on Monday November 04, 2019 @09:27AM (#21441903)
Creating a Developer ID certificate requires a paid Apple account. Hardly free.
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @06:19PM (#21447781)
I think only a distribution certificate requires a paid account.
Re:Electron apps cannot be submitted to the Apple store by LeoNatan25 on Monday November 04, 2019 @07:20PM (#21448291)
Now you've thrown me a curveball. I will have to test. I think last time I looked, Developer ID is considered a distribution certificate and requires payment.
Re:Electron apps cannot be submitted to the Apple store by saagarjha on Monday November 04, 2019 @07:42PM (#21448453)
I'll admit I haven't tried this personally, either; I've just heard that it's possible.
Re:Electron apps cannot be submitted to the Apple store by spsrich2 on Sunday November 03, 2019 @08:02PM (#21438048)
People should start showing Apple the finger back
Re:Electron apps cannot be submitted to the Apple store by partiallypro on Sunday November 03, 2019 @07:01PM (#21437690)
Apple just rebuilds any popular app and makes it first party anyhow. At some point most developers will stop bothering just for that.
Re:Electron apps cannot be submitted to the Apple store by kick on Sunday November 03, 2019 @07:09PM (#21437745)
Really? Can you link their Sketch and Photoshop replacements? I know some designers who could use those.
Re:Electron apps cannot be submitted to the Apple store by partiallypro on Thursday November 07, 2019 @10:26AM (#21473987)
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 by ajross on Sunday November 03, 2019 @06:56PM (#21437665)
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 environment, it's that the response seems really disproportionate to the offense and pretty badly misdirected.

A more conspiratorially minded poster might wonder if the real goal here was to dissuade developers from using cross-platform frameworks...

Re:Electron apps cannot be submitted to the Apple store by jbverschoor on Sunday November 03, 2019 @07:05PM (#21437713)
Why? It’s very clear what’s wrong. Don’t use private APIs.

Thank you Apple for keeping things clean!!

Re:Electron apps cannot be submitted to the Apple store by imtringued on Wednesday November 06, 2019 @04:26AM (#21460932)
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 by bdcravens on Sunday November 03, 2019 @07:48PM (#21437976)
No. Apple is responsible for their platform, not the ecosystem.