Davidap,

You must first understand what kind of data you have and how that data would be 
shared with users.

The “Application Support” folders — both in /Library and in ~/Library (“~” 
means “current user”) — are meant for files that are needed by the application 
but shouldn’t be stored in the app bundle itself — for example, because they 
will be constantly changed by the application or if they store data in a way 
that shouldn’t be directly manipulated by users. One example of this is the 
Mail.app that comes bundled with macOS: it stores its databases and indexes in 
the *user's* Application Support folder (~/Library/Application Support/Mail), 
as each user will have his/her own mail accounts, messages and folders and the 
data will change often. Mail.app users sometimes need to deal with individual 
messages or mailboxes, which can be exported and manipulated by the user in 
other programs *after being saved* to their desktop or, for example, the 
“Documents” folder.

If your app doesn’t manage data in an “intermediate” format or in a database — 
unlike Mail.app, for example —you can have your users save their files wherever 
they want. Some apps create a folder inside "~/Documents" for each user to save 
his/her own documents, but this shouldn’t be mandatory.

Documents that an application generates and that are meant to be directly 
manipulated by multiple users of the same machine should be stored in 
"/Users/Shared”. It’s the only folder in the whole system that is available to 
all users.

I am sure this is documented somewhere, but I hope I could help you.


Regards,
Flavio



> Am 15.04.2021 um 12:26 schrieb cocoa-dev-requ...@lists.apple.com:
> 
> Von: Davidap <i...@nacsport.com <mailto:i...@nacsport.com>>
> Betreff: Aw: /Library/Application Support off limits?
> Datum: 15. April 2021 um 04:47:54 GMT-3
> An: Jack Brindle <jackbrin...@me.com <mailto:jackbrin...@me.com>>, cocoa-dev 
> <cocoa-dev@lists.apple.com <mailto:cocoa-dev@lists.apple.com>>
> 
> 
> But in / Users / Shared I need to know which user installed the application. 
> How to share application data with users, I guess there must be an easier way 
> or some way to ask for root privileges to use ~ / Library / Application 
> Support / com.example.MyApp / directory with localDomainMask.
> 
> Davidap

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to