←back to thread

The Anatomy of a macOS App

(eclecticlight.co)
278 points elashri | 1 comments | | HN request time: 0s | source
Show context
13415 ◴[] No.46182886[source]
No wonder everyone is building web apps. Operating systems are doing their best to make themselves obsolete.
replies(4): >>46184648 #>>46184967 #>>46186717 #>>46189793 #
mikecsh ◴[] No.46184648[source]
I don't follow - can you elaborate?
replies(1): >>46185499 #
bigyabai ◴[] No.46185499[source]
If developers have to static-link all their libraries to ship a Mac-native app, you're already doing most of the work to ship a cross-platform web runtime like Electron.

Therefore it's not super surprising that successful products like Discord/Slack/Spotify gave up on a good native experience decades ago.

replies(3): >>46186602 #>>46186794 #>>46186864 #
kccqzy ◴[] No.46186794{3}[source]
The article clearly states that Apple provides standardized locations for apps to store their dynamically linked libraries.
replies(1): >>46186882 #
ux266478 ◴[] No.46186882{4}[source]
one of the weirdest and most off-putting parts of macos for me was that dyld isn't aware of that standardized location. a lot of curious oversights the more you pick at it.
replies(1): >>46187205 #
dagmx ◴[] No.46187205{5}[source]
What do you mean? I can just tell the linker to link against something in the shared cache and it finds it. It’s been as simple as `-framework <FrameworkName>`

I’ve never had to do extra work to find a system vendored dylib in my decades of supporting cross platform apps.

replies(2): >>46191663 #>>46194275 #
1. ux266478 ◴[] No.46194275{6}[source]
I mean I had to manually patch the rpaths of macos binaries distributed as an app bundle, because dyld didn't have the relative location of the shared libs in the app bundle in its search path. Not a huge deal, since patching rpaths was also part of the other Unix pipelines, the reasoning was just different. Patching rpaths on other platforms was because we were distributing dependencies in the base directory of the application, which isn't the standard way to do things. On mac, it was because the dynamic linker wasn't aware of app bundle structure for some reason, which is a weird disconnect between an OS standard and a basic system component.