Have a look at the LaunchServices/LSSharedFileList.h header file. Unfortunately, the functions in this file are not documented in the Xcode docs, but the comments in the file are very good. Basically, you create a reference to the list of recently opened applications by passing kLSSharedFileListRecentApplicationItems to LSSharedFileListCreate(). Then get an array of the current contents of the list with LSSharedFileListCopySnapshot().
发布评论
评论(1)
查看
LaunchServices/LSSharedFileList.h
头文件。不幸的是,这个文件中的函数并没有记录在Xcode文档中,但是文件中的注释非常好。基本上,您可以通过将kLSSharedFileListRecentApplicationItems
传递给LSSharedFileListCreate()
来创建对最近打开的应用程序列表的引用。然后使用LSSharedFileListCopySnapshot()
获取列表当前内容的数组。Have a look at the
LaunchServices/LSSharedFileList.h
header file. Unfortunately, the functions in this file are not documented in the Xcode docs, but the comments in the file are very good. Basically, you create a reference to the list of recently opened applications by passingkLSSharedFileListRecentApplicationItems
toLSSharedFileListCreate()
. Then get an array of the current contents of the list withLSSharedFileListCopySnapshot()
.