I would like to be able to gather info like how often certain windows are opened, what types of user data are accessed, how often menu items are clicked, etc. Does anyone know of a 3rd party (open source or commercial) Cocoa/Obj-C library or plugin that would allow me to gather this info?
views:
85answers:
2
+1
A:
I have used pinch media in the past, and they merged with Flurry. Library was simple to use and was setup in around 40 minutes.
Brian King
2010-04-28 18:35:24
That seems to be for Cocoa Touch apps, not Cocoa apps.
Peter Hosey
2010-04-28 20:57:16
Hrm, that's interesting, I guess they use UIKit to monitor some times...This is another package I saw, again it's iPhone based, but modifying it to work on the mac would be easy.http://code.google.com/p/bkxititag
Brian King
2010-04-28 21:42:50
Yeah, it'll be good if Flurry open-source their library or makes it available also for the Mac.
adib
2010-05-04 01:28:47
+1
A:
I don't know any library for that but at least to get informed about when the user switches the front application you can install an event handler like this:
EventTypeSpec eventType;
eventType.eventClass = kEventClassApplication;
eventType.eventKind = kEventAppFrontSwitched;
EventHandlerUPP handlerUPP = NewEventHandlerUPP(FrontAppSwitchedDetector_callback);
OSStatus status=InstallApplicationEventHandler(handlerUPP,1,&eventType,self,&_eventHandlerRef);
... and when receiving an callback you may get the current front application process:
pascal OSStatus FrontAppSwitchedDetector_callback(EventHandlerCallRef nextHandler,EventRef theEvent,void* userData)
{
ProcessSerialNumber newSerial;
GetFrontProcess(&newSerial);
//to something with that ....
return (CallNextEventHandler(nextHandler, theEvent));
}
Robert
2010-05-31 21:37:53