Application folder does not exist when MacOS app is run the first time

When my QT app starts first time on MacOS, its directory ./Application Support/Sharlines/Lines/ does not exit, but QT creates it when I write to QSettings first time.

To create the local directory I added the following code:

// Local data directory does not exist when the app is run first time on MacOS.
if (fs::create_directories(GetLocalFolder()))
{
    qDebug() << static_cast<QString>(qtil::Format() << "Local folder '" << GetLocalFolder() << "' has been created.");
}

Removing local and app store data with the command line:

rm -fr ./Application\ Support/Sharlines/Lines/
rm -fr ~/Library/Containers/com.sharlines.balls/Data/Library/Application\ Support/Sharlines/Lines/

Leave a Reply

Your email address will not be published. Required fields are marked *