Davidap,

I still can’t understand your use case. You say you have a server, but is it a 
remote or a local one? I ask that because Uli’s recommendation is to have a 
local server for users in the same machine to share the data between them. Yet, 
from a development standpoint, that would be pretty much the same as a 
networked application (remote server), but it has the “advantage" of getting 
the network out of the equation (which makes A LOT of difference).

I’m guessing here, what you want is a “partially-connected client” application: 
the user gets data from a server and, if he/she goes offline, can keep working 
with the locally-cached data. Probably, a mechanism should be provided for the 
user to synchronize that data with the server later. Is this what you want? If 
so, the local cache should be kept in the user’s Application Support folder (or 
even in a document inside the user’s home folder), because each user’s cached 
data can be different.


Regards,
Flavio

> Am 19.04.2021 um 04:27 schrieb Davidap <i...@nacsport.com>:
> 
> Hi,
> 
> 
> I actually currently use a server and the keychain, but I want to share 
> general data with offline users. I will never use the shared directory of a 
> user, the best way would be in / Application Support in .localDomainMask, but 
> I don't know why some applications can and others cannot (the mine is signed 
> and notarized).
> 
> 
> Regards
> 
> El 19/4/21 a las 1:51, Uli Kusterer escribió:
>> On 15. Apr 2021, at 21:29, Flavio Donadio via Cocoa-dev 
>> <cocoa-dev@lists.apple.com> wrote:
>>> 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.
>> That is actually wrong. It is dangerous to create world-writable files and 
>> share them between users. If you need to share data between users that is 
>> not fixed (e.g. it would make sense if Apple installed GarageBand loops in 
>> /Application Support, as they will be used by all users that launch Garage 
>> Band, but since Garage Band comes preinstalled you don't want all that disk 
>> space for the loops to be used, you want to download them later).
>> 
>> If you have databases shared by multiple users, you should use a Launch 
>> Agent plist that launches a server process, then have any instances of your 
>> app currently running (remember, there may be multiple instances running 
>> under Fast User Switching) talk to that process. That way, the process can 
>> also enforce valid file formats, making sure one user can not ruin things 
>> for another user by feeding invalid data or deleting their data.
>> 
>> Cheers,
>> -- Uli Kusterer
>> "The Witnesses of TeachText are everywhere..."
>> http://www.zathras.de
>> 

_______________________________________________

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