アプリに必要なフレームワークを特定する


1

いくつかのアプリを使用して、ディスクイメージをできるだけ小さくしようとしています。各アプリがどのフレームワークパッケージを使用しているかを調べて、起動するためにそれらをディスクイメージにコピーする必要があります。この情報を見つけるにはどうすればよいですか?

コンソールを使用して、一部のアプリはフレームワーク名のエラーメッセージを生成しますが、他のアプリは生成しないことに気付きました。

回答:


0
otool -L /path/to/yourapp.app/Contents/MacOS/yourapp

This returns a list of the frameworks that the app binary makes reference to. They are listed with the path to the framework which lets you find the binary for copying, or you can write a script to parse the output to do this for you.

Make sure you run this command on the app binary, not the bundle.

Framework paths beginning with ‘@rpath’, ‘@executable_path’ or ‘@loader_path’ are frameworks located within the app bundle, so as long as you're copying the app bundle you don't have to do anything special with these frameworks.

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.