On Nov 28, 2014, at 10:14 AM, Ben Staveley-Taylor 
<ben.staveley-tay...@oracle.com> wrote:

> I want to determine from which server my application was downloaded, on its 
> first use. (The app is hosted on many servers and I want to work out which 
> one to connect back to.)

This seems like an _extremely_ fragile approach.  Perhaps the different servers 
should host slightly different versions of the app, with the server identity 
encode within it.  Or the servers should host an archive that includes the app 
plus a configuration file next to it that the users can drop onto the app to 
configure it.


> The Mac OS adds quarantine info to downloaded files. This is handled by 
> Launch Services, so I can use LSCopyItemAttribute with 
> kLSItemQuarantineProperties and look at the kLSQuarantineOriginURLKey value. 
> However, the quarantine info is erased once the user has authorised the first 
> use of the download.

Are you sure about that?  I haven't tested via the Launch Services API, but I 
know that the com.apple.quarantine extended attribute is not removed from the 
file(s) in modern versions of the OS.  Rather, the system modifies a flag value 
within it and also records the fact that the user approved the launch in a 
system database so it doesn't ask again.

Regards,
Ken


_______________________________________________

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