The Anatomy of a macOS App
Posted by elashri 4 days ago
Comments
Comment by mitchellh 4 days ago
This is correct, but practically speaking non-notarized apps are pretty terrible to use for a user enough so that this isn't optional and you're going to pay your $99/yr Apple tax.
(This only applies to distributed software, if you are only building and running apps for your own personal use, its not bad because macOS lets you do that without the scary warnings)
For users who aren't aware of notarization, your app looks straight up broken. See screenshots in the Apple support site here: https://support.apple.com/en-us/102445
For users who are aware, you used to be able to right click and "run" apps and nowadays you need to actually go all the way into system settings to allow it: https://developer.apple.com/news/?id=saqachfa
I'm generally a fan of what Apple does for security but I think notarization specifically for apps outside the App Store has been a net negative for all parties involved. I'd love to hear a refutation to that because I've tried to find concrete evidence that notarization has helped prevent real issues and haven't been able to yet.
Comment by jclay 4 days ago
It’s basically pay to play to get in the good graces of Windows Defender.
I think all-in it was over $1k upfront to get the various certs. The cert company has to do a pretty invasive verification process for both you and your company.
Then — you are required to use a hardware token to sign the releases. This effectively means we have one team member who can publish a release currently.
The cert company can lock your key as well for arbitrary reasons which prevents you from being able to make a release! Scary if the release you’re putting out is a security patch.
I’ll take the macOS ecosystem any day of the week.
Comment by dceddia 4 days ago
If you go this route I highly recommend this article, because navigating through Azure to actually set it up is like getting through a maze. https://melatonin.dev/blog/code-signing-on-windows-with-azur...
Comment by lwkl 3 days ago
For an individual the Apple code signing process is a lot easier and more accessible since I couldn't buy a code signing certificate for Windows without being registered as a business.
Comment by dceddia 3 days ago
Where can you get an EV cert for $120/year? Last time I checked, all the places were more expensive and then you also had to deal with a hardware token.
Lest we talk past each other: it's true that it used to be sufficient to buy a non-EV cert for around the same money, where it didn't require a hardware token, and that was good enough... but they changed the rules in 2023.
Comment by jonathanlydall 4 days ago
Comment by Razengan 4 days ago
So $120 a year but no it's only Apple with a "tAx"
Comment by TimeBearingDown 4 days ago
A macOS app distributed without a trusted signature will reach a far smaller audience, even of the proportionately smaller macOS user base, and that's largely due to deliberate design decisions by Apple in recent releases.
Comment by feznyng 3 days ago
My low-stakes conspiracy theory is that MS is deliberately making this process awful to encourage submission of apps to the Microsoft Store since you only have to pay a one-time $100 fee there for code-signing. The downside is of course that you can only distribute via the MS store.
Comment by deltaknight 4 days ago
At least paying your dues to Apple guarantees a smooth user experience.
Comment by jonathanlydall 4 days ago
Source: We tried a non-EV code signing certificate for our product used by only dozens of users at the time, never stopped showing scary warnings. When we got an EV, no more issues.
In case it makes a difference, we use DigiCert.
Comment by e40 4 days ago
Comment by jonathanlydall 4 days ago
I regularly download our signed installer often within a minute of it being made available, never noticed a delay.
Maybe it’s very the first time Windows Defender sees a particular org on a cert.
I renewed our cert literally on Friday, tested by making a new build of our installer and could instantly install it fine.
You sure there was no other non Windows default security software on your bosses machine?
Comment by feznyng 3 days ago
Comment by jonathanlydall 2 days ago
Comment by e40 2 days ago
I was always able to install immediately on the same machine.
Comment by ryandrake 4 days ago
Comment by jeroenhd 4 days ago
That's also one of the main reasons why Windows was such a malware-ridden hellspace. Microsoft went the Apple route to security and it worked out.
At least Microsoft doesn't require you to dismiss the popup, open the system settings, click the "run anyway" button, and enter a password to run an unsigned executable. Just clicking "more details -> run anyway" still exists on the SmartScreen popup, even if they've hidden it well.
Despite Microsoft's best attempts, macOS still beats Windows when it comes to terribleness for running an executable.
Comment by ryandrake 3 days ago
Comment by etbebl 4 days ago
Comment by Archit3ch 3 days ago
Perhaps .exe is easier, but I wouldn't subject the wider public (or even power users) to that.
So yeah, Azure Trusted Signing or EV certificate is the way to go on Windows.
Comment by jezek2 4 days ago
Another alternative would be to bundle this app: https://github.com/alienator88/Sentinel
It allows to easily unlock it by drag'n'drop.
Comment by tyre 4 days ago
Comment by jezek2 4 days ago
In one application I also offered an alternative by using a web app in case they were not comfortable with any of the option.
Also it's presented in a .dmg file where you have two icons, the app and the "How to install". I would say that's quite inviting for investigation :)
Comment by Klonoar 4 days ago
It’s unfortunate it’s come to this but Apple is hardly the worst of the two now.
Comment by TobbenTM 4 days ago
Azure Trusted Signing is 100% the best choice, but if for whatever reason you cannot use it, you can still use your own cloud store and hook in the signing tools. I wrote an article on using AWS KMS earlier this year: https://moonbase.sh/articles/signing-windows-binaries-using-...
TLDR: Doing this yourself requires a ~400-500$/year EV cert and miniscule cloud costs
Comment by jonathanlydall 4 days ago
We’re (for the moment) a South African entity, so can’t use Azure Trusted Signing, but DigiCert has no issue with us using Azure KeyVault for our EV code signing certificate.
I had ours renewed just this week as it happens. Cost something like USD 840 before tax, don’t have a choice though and in the grand scheme of things it’s not a huge expense for a company.
Comment by rxliuli 4 days ago
Comment by jezek2 4 days ago
Not only is such signing all about control (the Epic case is a great example of misuse and a reminder that anyone can be blocked by Apple) it is also anti-competitive to other programming languages.
I treat each platform as open only when it allows running unsigned binaries in a reasonable way (or self-signed, though that already has some baggage of needing to maintain the key). When it doesn't I simply don't support such platform.
Some closed platforms (iOS and Android[1]) can be still supported pretty well using PWAs because the apps are fullscreen and self-contained unlike the desktop.
[1] depending on if Google will provide a reasonable way to run self-signed apps, but the trust that it will remain open in the future is already severely damaged
Comment by conradev 4 days ago
It makes it easy for tools like Santa or Little Snitch to identify binaries, and gives the kernel/userspace a common language to chat process identity. You can configure similar for Linux: https://www.redhat.com/en/blog/how-use-linux-kernels-integri...
But Apple's system is centralized. It would be nice if you could add your own root keys! They stay pretty close to standard X.509.
Comment by sholladay 4 days ago
In each case, Apple revoked the enterprise certificate for the company, which caused a lot of internal fallout beyond just the offending app, because internal tools were distributed the same way.
Something may have changed, though, because I see Screenwise Meter listed on the App Store for iOS.
https://www.wired.com/story/facebook-research-app-root-certi...
https://www.eff.org/deeplinks/2019/02/google-screenwise-unwi...
Comment by lapcat 4 days ago
Apple revokes macOS Developer ID code signing certificates all the time, mostly for malware, but occasionally for goodware, e.g., Charlie Monroe and HP printer drivers.
Also, infamously, Apple revoked the macOS Developer ID cert of Epic Games, as punishment for their iOS App Store dispute.
Comment by sneak 4 days ago
The system sucks. I’d love to be able to sign my legitimate apps with my legitimate company, but I don’t wish to put the name on my passport onto the screens of millions of people, and my company (around and operating for 20-ish years now) doesn’t pass the Apple verification for some reason.
I also can’t use auto-enroll (DEP) MDM for this reason.
Comment by tensor 4 days ago
Comment by bitwize 4 days ago
The future is signed code with deep identity verification for every instruction that runs on a consumer device, from boot loader through to application code. Maybe web site JavaScript will be granted an exception (if it isn't JIT-compiled). This will be a good thing for most consumers. Until Nintendo cleaned out all the garbage and implemented strict controls on who may publish what on their console, the North American video game market was a ruin. The rest of computing is likely to follow suit, for similar reasons.
Comment by Citizen_Lame 3 days ago
"Accountability means money and paperwork." Beautiful. Just beautiful. You know what else means money and paperwork? A protection racket. "Nice app you got there, shame if something happened to it before it reached customers. That'll be 30% please." But sure, let's call extortion "accountability" because Tim Apple said so.
Your driver signing example is chef's kiss levels of missing the point. Microsoft said "hey, sign your drivers so we know they're not malware" they didn't say "only drivers we approve can run, and also we get a cut." You're comparing a bouncer checking IDs to a mafia don enforcing territory. These are not the same thing.
And oh my god, the Nintendo argument. You're seriously holding up Nintendo's lockout chip as consumer protection? The same lockout chip they used to squeeze third-party developers, control game production, and maintain an iron grip on pricing? "Until Nintendo cleaned out the garbage" yeah, they cleaned it out alright, straight into their own pockets. The video game crash was caused by publishers like Atari flooding the market with garbage like E.T., not by independent developers needing more "accountability."
"The future is signed code with deep identity verification for every instruction." Holy hell. You're not describing a security feature, you're describing a prison. You're literally fantasising about a world where every line of code needs corporate permission to execute. That's techno feudalism with RGB lighting.
This isn't about protecting anyone from bugs. It's about trillion-dollar companies convincing people like you that you need their permission to use the computer you bought. And somehow, SOMEHOW, you've decided this is good actually, and the 1980s with its freedom and innovation was the problem.
The fact that you think general-purpose computing is a "danger" that needs to be locked down says everything about how effectively these corporations have trained you to beg for your own chains.
Comment by bitwize 3 days ago
Yeah. It's gonna suck for us but the consumer market will eat it up. An Xbox that runs Excel. It's not a fantasy. What do you think the Windows 11 hardware requirements were all about? It's Microsoft's way of getting people to get rid of their old PCs without the necessary security hardware, so that when Windows 12 comes out the PC will be a fully locked down platform.
Again, consumers ate up the NES. They ate up the iPhone. This happened partially because of, not in spite of, the iron grip the vendor had over the platform, because they came with a guarantee (a golden seal even, in Nintendo's case!) that no bad stuff would slip through. It filtered out a lot of good stuff, too, but the market has shown that's a price it's willing to pay for some measure of assurance that the bad stuff will be stopped at the source. It's a business strategy that works in the broader market, even though it harms techies. Techies are a tiny, tiny minority, and it's time they learned their place in the grand scheme of things.
Comment by lwkl 3 days ago
Comment by internet2000 4 days ago
Comment by jonathanlydall 4 days ago
The USD 99 annual fee is almost inconsequential, the painful part was getting a DUNS number (we’re a South African entity) and then getting it to work in a completely automated manner on our build server.
Fortunately, once set up it’s been almost no work since.
Comment by sneak 4 days ago
For normal users this might as well be impossible.
Remember, your average user needs a shortcut to /Applications inside the .dmg image otherwise they won’t know where to drag the app to to install it.
Comment by mrpippy 4 days ago
Comment by saagarjha 4 days ago
Comment by TheDong 4 days ago
Notarization made it significantly harder to cross-compile apps for macOS from linux, which means people have to buy a lot of macOS hardware to run in CI instead of just using their existing linux CI to build mac binaries.
You also need to pay $99/year to notarize.
As such, I believe it's resulted in profit for Apple, so at least one of the parties involved has had some benefit from this setup.
Frankly I think Apple should keep going, developer licenses should cost $99 + 15% of your app's profit each year, and notarization should be a pro feature that requires a macbook pro or a mac pro to unlock.
Comment by mvkel 4 days ago
How I wish our operating systems still looked like this. Utilitarian, useful. No rounded corners and bubbly icons, reducing the useful space more and more each year.
The incredible quality of Mac hardware is the only thing keeping me from jumping to a thinkpad / omarchy setup.
Comment by Wowfunhappy 4 days ago
(What I am a fan of is Leopard-era Aqua, which is reasonably information dense but uses depth and color to help focus your attention.)
Comment by astrange 4 days ago
Comment by cachius 4 days ago
It does not support the claim that corners are in any way special for human vision. I’m very skeptical on that. AFAIK motion is most easily perceptible.
Comment by astrange 4 days ago
I did tell a true and previously unreported Steve Jobs story on reddit the other day and was voted to -10 and someone told me I was off my meds. In conclusion, Steve Jobs is a land of contrasts.
> AFAIK motion is most easily perceptible.
That's how it works for predators, but you can see things that are still if you're focusing on them. It's important to see corners in real life because they actually can poke you. Like a paper cut.
Comment by Lammy 4 days ago
Your binocular field of vision is a round rect: https://openbooks.lib.msu.edu/neuroscience/chapter/vision-ce...
Comment by tom_ 4 days ago
Disclaimer: I have a desktop Mac, and I'm assuming the pixel counts are the same for the laptops.
(The window corners weren't always round, but there was a bit of rounding to the screen corners there from day 1: https://infinitemac.org/ - this really struck me when I first saw it, coming from the Atari ST.)
Comment by mvkel 3 days ago
Comment by tom_ 3 days ago
Comment by Wowfunhappy 4 days ago
Comment by lurking_swe 4 days ago
I do feel like we’ve gone too far from utilitarian though. I’d like to see more practical UI design.
Comment by mvkel 3 days ago
Comment by pharaohgeek 2 days ago
Comment by eviks 4 days ago
Comment by JanisErdmanis 3 days ago
My biggest issue, though, is Apple code signing. It’s already enough that a signature is attached to every binary, which seems wasteful. Why would anyone consider it better than keeping hashes of each file in one place and attaching the signature to them? Then there are entitlements, which are attached to the launcher binary when signed. Why couldn’t these just be stored in `Info.plist` or a separate file, instead of requiring this process?
And then there is notarisation, where at any point in the future, you might discover that your application bundle no longer passes, as requirements have become more stringent.
Comment by pjmlp 4 days ago
Comment by dana321 4 days ago
Comment by pjmlp 4 days ago
People keep missing Java's ideas due to OpenSTEP collaboration before Java came to be.
https://cs.gmu.edu/~sean/stuff/java-objc.html
https://en.wikipedia.org/wiki/Distributed_Objects_Everywhere
Comment by steve1977 4 days ago
Comment by andrekandre 4 days ago
Comment by kbolino 4 days ago
https://docs.oracle.com/en/java/javase/21/docs/specs/jar/jar...
Comment by LoganDark 4 days ago
Comment by classichasclass 4 days ago
Comment by saagarjha 4 days ago
That’s not what launchd’s main goal is and also not the path command line tools go through. They’re forked or spawned from your shell like any other UNIX system.
Comment by dana321 4 days ago
Comment by zombot 4 days ago
Comment by saagarjha 4 days ago
Comment by zombot 4 days ago
Comment by saagarjha 3 days ago
Comment by dSebastien 3 days ago
I contacted support and they don't want to help because I'm not using a Mac and using a third party framework (Tauri), even though it's just using xcrun, Apple's tool...
Also I've been unable to even use the notarization API to retrieve the submission logs and Apple didn't help for that either so far (they just disregarded my ticket).
I feel powerless and abused. This is the worst DX/CX I've had in years.
As a side note, authenticating against the notarization API is a nightmare. You get a PKCS8 that you have to use to create/sign a JWT and you're basically on your own... I had to build a little node program just to craft the JWT...
Comment by rogerrogerr 3 days ago
We can talk all day about how this _shouldn’t_ be necessary, but you are tilting at windmills trying to get Apple signing to work without Apple hardware. You’ve definitely spent more of your time trying to make this work than if you’d just buy a cheap Mac mini.
Comment by Klonoar 3 days ago
Comment by Archit3ch 4 days ago
IIRC, you can put stuff in arbitrary subfolders as long as you configure the RPATHs correctly. This works and passes notarization. I came across libname.dylib in the nonstandard location AppName.App/Contents/Libraries . Not to be confused with /Library or the recommended /Frameworks location. However, there are basically no benefits compared to using the recommended directory structure, and none of the 100+ macOS apps installed in my system have a /Libraries directory.
Comment by secretsatan 4 days ago
It’s picked up on submission automatically and not at review, but is a completely undocumented requirement.
Comment by 13415 4 days ago
Comment by pjmlp 4 days ago
There is no Web without operating systems, or do you imagine browsers run on pixie dust?
Comment by kccqzy 4 days ago
Comment by lurking_swe 4 days ago
Pros and cons to each. Not everything needs to be a native app. Some things SHOULD be native apps…i’m looking at you slack and friends.
Comment by mikecsh 4 days ago
Comment by bigyabai 4 days ago
Therefore it's not super surprising that successful products like Discord/Slack/Spotify gave up on a good native experience decades ago.
Comment by dagmx 4 days ago
There’s no such requirement. Tons of Mac apps bundle dylibs within them.
Comment by kccqzy 4 days ago
Comment by ux266478 4 days ago
Comment by dagmx 4 days ago
I’ve never had to do extra work to find a system vendored dylib in my decades of supporting cross platform apps.
Comment by eschaton 3 days ago
Most platforms don’t have a concept of “install name” distinct from the library name; the value was originally the full path to the deployment location of the library, which was revised to support meta-paths (like `@rpath/LibraryName`) in Mac OS X 10.4 and 10.5 and is what the runtime dynamic loader (dyld) uses to match a library at load time. So an application’s executable can have a set of self-relative run path search paths, which is how it can load libraries from its Frameworks and Libraries directories.
Comment by dagmx 3 days ago
The primary binary encodes relative to the executable path and any dylib that loads from it should be able to (by default) load relative to that
Comment by eschaton 3 days ago
However when building with just command line tools and not passing all the same arguments an Xcode project and target causes to be passed, you have to do extra work to ensure the right run path search paths get into built executables and the right install names get into built libraries and frameworks.
That latter is to ensure that if you don’t pass those extra arguments, executables and shared libraries are built for Darwin-based platforms as much as reasonably possible like they are on other UNIX-like platforms.
Comment by ux266478 3 days ago
Comment by ux266478 4 days ago