在 Mac 上探索 .app 文件
可以在 Mac 上访问应用程序源文件吗?在“应用程序”文件夹中,可以浏览任何 .app 文件,并可以访问头文件,是全部还是也可以访问类文件?
Can one get access to the application source files on mac? In Applications folder any .app file can be explored and there get access to the header files, is it all or can the class files be accessed too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非 Mac 应用程序包含私有框架(在应用程序包中),其中包含其标头(很少见),否则不会。
大多数时候,Mac 应用程序仅包含应用程序的二进制文件以及资源(图标、图像、L10N 等)。
如果您知道如何处理汇编语言,则可以反汇编二进制文件。
如果应用程序是使用 Objective-C 构建的,则可以使用特定工具从二进制文件生成包含所有 Objective-C 接口的头文件。
例如,看看 ClassDump 。
您还可以在应用程序的二进制文件上使用 nm 命令来获取其包含的符号列表。
Unless a Mac application includes private frameworks (in the application bundle), which includes their headers (rare), no.
Most of the time, a Mac application will just contain the application's binary, as well as resources (icons, images, L10N, etc.).
You may disassemble the binary, if you know how to deal with assembly language.
If the application was built with Objective-C, you can use specific tools to produce a header file from the binary, with all the Objective-C interfaces.
Take a look at ClassDump, for instance.
You may also use the
nm
command, on the application's binary, to get a list of the symbols it contains.