Date
Jul. 21st, 2024
 
2024年 6月 16日

Post: Determining UTIs defined by App bundles

Determining UTIs defined by App bundles

Published 12:04 Apr 13, 2017.

Created by @ezra. Categorized in #Programming, and tagged as #macOS.

Source format: Markdown

Table of Content

We know that lsregister -dump is an option; however, I'm left to wonder if there isn't a better solution.

In my searching I've come across a private API that could be of use:

__UTCopyDeclaredTypeIdentifiers

Since there's absolutely no documentation for it, I give you this:

import Foundation
@_silgen_name("_UTCopyDeclaredTypeIdentifiers") func UTCopyDeclaredTypeIdentifiers() -> CFArray

let UTIs = UTCopyDeclaredTypeIdentifiers()
print(UTIs)

Should print all the UTIs that the function knows about. Pretty simple.

Pinned Message
HOTODOGO
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF