Re: Is it possible to read your own quarantine info after launch?
Re: Is it possible to read your own quarantine info after launch?
- Subject: Re: Is it possible to read your own quarantine info after launch?
- From: Ken Thomases <email@hidden>
- Date: Fri, 28 Nov 2014 16:18:00 -0600
On Nov 28, 2014, at 10:14 AM, Ben Staveley-Taylor <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden