Hello,
i want to commit to a C-Code-Project on github to make it work correctly on macOS.
Under Objective-C there is the function NSSearchPathForDirectoriesInDomains, but i need to stay with C code.
Therefore i need to get paths like ApplicationSupport and Folder of User.
For the Bundle there is code like
char path[1024];
CFBundleRef main_bundle = CFBundleGetMainBundle(); assert(main_bundle);
CFURLRef main_bundle_URL = CFBundleCopyBundleURL(main_bundle); assert(main_bundle_URL);
CFStringRef cf_string_ref = CFURLCopyFileSystemPath( main_bundle_URL, kCFURLPOSIXPathStyle); assert(cf_string_ref);
CFStringGetCString(cf_string_ref, path, 1024, kCFStringEncodingASCII);
CFRelease(main_bundle_URL);
CFRelease(cf_string_ref);
How can i get AppSupportDir, there is no info.plist file.