New games every week!
Frustrating Googling vs MacOS Saves Blog
17th February 2018
Spent about an hour, last night, trying to figure out how to get the "Home Directory" of an App, from MacOS, using just C++.

-=-=-

The main issue being that, nowadays, Apple tend to "Sandbox" everything, so you can't just dump save files willy nilly like you used to.
Instead, you need to request the path to the "app's" Home Directory, where the sandbox will allow you to save what you want.

Everyone's insistent that I make use of either NSHomeDirectory or CFCopyHomeDirectoryURL.
NSHomeDirectory does not exist in C++, and isn't usable.
CFCopyHomeDirectoryURL does exist in C++, but doesn't work in MacOS as it's only available for iOS.

It took AGES to even get far enough for it to tell me THAT much, as everyone was saying "Use X Command", and nobody (literally NOBODY) was saying "You'll need to include y.h before you can use that".

The world of C++ development (especially on forums) is chock-full of issues like this, and it's been a long hard fight to get as far as I can.
If I see one more person say "You know, that's piss easy if you include this 17Gb of includes, first!", then I'm going to go frickin' crazy.
.. Frankly, I may have already done that, at some point over the last few months!!

Suffice to say, saves still aren't working on MacOS.
Today will mostly be spent trying (again) to figure out how on earth I'm going to do that.

Grrr!
Views 72, Upvotes 10  
Daily Blog , 2018 Framework
New games every week!
Site credits : This was all done by Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Frustrating Googling vs MacOS Saves - AGameAWeek