@isaiah

862 Followers
670 Following
8.1K Posts

i'm a software developer. primarily for macOS. primarily in Obj-C. primarily working on https://yourhead.com/stacks

but it hasn't always been that way. i used to write other software, in other languages. and before that i designed microchips.

Webhttps://yourhead.com

it seems like nearly everyone in tech believes that AI adoption is rapidly changing… something.

what exactly it’s changing and where that will lead seems to be very contentious.

obviously there are the kool aid true believers.
and there are the never-llm folks.
that’s fine. i understand those views.

but i’m more interested in the hot takes of the folks that fall somewhere in between.

what’s your most interesting hot take about where AI might change tech in the next few years???
ObjC is so hard to read!!! Meanwhile…
An Easter Morning Message of Hope From the Winner of the FIFA Peace Prize
https://daringfireball.net/linked/2026/04/05/easter-morning-message-of-hope
An Easter Morning Message of Hope From the Winner of the FIFA Peace Prize

Link to: https://truthsocial.com/@realDonaldTrump/posts/116351998782539414

Daring Fireball

thanks everyone for helping with document/project/workspace settings.

there doesn't really seem to be any sort of facility to do this within the Cocoa frameworks.

using NSDocument prevents out-of-band writing to the documents NSFileWrapper.

not using NSDocument means building your own file coordination and all the other complex stuff NSDocument does.

saving to the app support folder or to NSUserDefaults makes unique keys the difficult problem.

IOW: there are no easy or de facto solutions.

@isaiah I sometimes save these things as xattributes in the document itself. If you want them to be user-specific though, you'd probably be better off saving a separate per-document file in ApplicationSupport or something

@isaiah @troz That’s correct, so scene storage/state restoration definitely wouldn’t fit the bill. I don’t think the frameworks have any built in solution for per document state, so it’s a roll-your-own world.

I have seen a couple apps store stuff in xattrs if it’s small. Might not survive copying to certain drive formats, but otherwise pretty easy out-of-band storage.

@isaiah I save whenever I call defaults.setXxxFor(key:). Just a plist write to the file system within the document bundle folder. DocumentProperties.plist is the file I wrote to. And since my app is a database app I write to the database all the time as users make changes. Not just by pressing save. My document is never really in a dirty state.
i always find it a bit strange when building something akin to a component of an Apple app, but it isn’t really represented well by Foundation or Appkit. it feels like if Xcode finds it useful, then that would be useful to other Mac devs too — so a good component for Cocoa in general.
basically what i want is Xcode’s xcuserdata. it’s not part of the project data per se — which is why most folks put it in their git ignore file — but it saves the state of that project the last time it was opened — even if you don’t explicitly change the project itself or change/save any source files.