• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to read your own quarantine info after launch?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Ben Staveley-Taylor <email@hidden>
  • Date: Sat, 29 Nov 2014 21:44:05 +0000

Thanks, Ken. Certainly the test code that I wrote failed to get the kLSQuarantineOriginURLKey value and I assumed that was because the quarantine info had been cleared, but maybe it was a different cause. Anyway, you’re right, even if it works it is too fragile. I can’t arrange for each server to host a different build, but probably a config file is the way to go.

— Ben.

On 28 Nov 2014, at 22:18, Ken Thomases <email@hidden> wrote:

> 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


References: 
 >Is it possible to read your own quarantine info after launch? (From: Ben Staveley-Taylor <email@hidden>)
 >Re: Is it possible to read your own quarantine info after launch? (From: Ken Thomases <email@hidden>)

  • Prev by Date: App fails on Yosemite - "Cannot remove an observer"
  • Next by Date: Re: App fails on Yosemite - "Cannot remove an observer"
  • Previous by thread: Re: Is it possible to read your own quarantine info after launch?
  • Next by thread: [PSA] Non-layer backed views + scrolling + visual artifacts
  • Index(es):
    • Date
    • Thread