Re: Tracking Safari usage through a background process or dameon
Re: Tracking Safari usage through a background process or dameon
- Subject: Re: Tracking Safari usage through a background process or dameon
- From: Dave Keck <email@hidden>
- Date: Fri, 13 Nov 2009 22:59:56 -1000
> I need to develop a background process that gets started on user login to
> Mac machine and then onwards it logs whatever operations the user is
> performing on Safari.
On OS X, background processes should be implemented as launchd daemons
or agents. For your case, you probably want a launchd agent. (A
caveat, though, is launchd agents can be unloaded by the user for
which it is running, so if your process is security-related, this may
not be appropriate, in which case you'll probably have to use some
other mechanism.)
For more information, Google launchd.
> 1. How can my bg process can continuously track Safari, how to do it on
> Mac?
This isn't going to be easy, and will likely involve some code
injection or other hackery. (This list doesn't take kindly to
tinkering with black magic, private APIs, etc.)
> 2. How can i get information about what url is user visiting in safari, get
> notified when a new tab is open, get information about what media contents
> (images, streaming media etc) is present on the webpage etc.
See #1; unfortunately, I'd be very surprised if this degree of
granularity (notifications when new tabs are created, etc.) is
possible exclusively with public APIs.
It sounds like you're implementing some sort of parental or spy
utility. Judgements aside, might I suggest monitoring the HTTP
traffic, rather than attempting to hook into Safari? I'd imagine you'd
have more luck with that.
Anyway, as mentioned, this is getting dangerously close to "the line"
as far as this list is concerned, so... yeah.
_______________________________________________
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