有谁知道可用于收集应用程序使用数据的 Cocoa/Obj-C 库

发布于 2024-08-31 07:32:41 字数 96 浏览 10 评论 0原文

我希望能够收集信息,例如打开某些窗口的频率、访问什么类型的用户数据、单击菜单项的频率等。有谁知道第 3 方(开源或商业)Cocoa/Obj -C 库或插件可以让我收集这些信息吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若水微香 2024-09-07 07:32:41

我过去使用过捏媒体,它们与 Flurry 合并。库使用起来很简单,大约 40 分钟即可完成设置。

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.

入怼 2024-09-07 07:32:41

我不知道有什么库可以做到这一点,但至少要了解用户何时切换前端应用程序,您可以安装这样的事件处理程序:

EventTypeSpec eventType;
eventType.eventClass = kEventClassApplication;
eventType.eventKind  = kEventAppFrontSwitched;
EventHandlerUPP handlerUPP = NewEventHandlerUPP(FrontAppSwitchedDetector_callback);
OSStatus status=InstallApplicationEventHandler(handlerUPP,1,&eventType,self,&_eventHandlerRef);

...并且当收到回调时,您可能会获得当前的前端应用程序进程:

pascal OSStatus FrontAppSwitchedDetector_callback(EventHandlerCallRef nextHandler,EventRef theEvent,void* userData)
{
    ProcessSerialNumber newSerial;
    GetFrontProcess(&newSerial);
    //to something with that ....
    return (CallNextEventHandler(nextHandler, theEvent));
}

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));
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文