How to embed an Info.plist into arbitrary binaries

For an application on OS X, the Info.plist file is very common. But could we embed it into the binaries?

Yes, we can. There is a compiler option “–sectcreate __TEXT __info_plist Info.plist”.

One example is the .pro file for qmlplugindump in qtdeclrative, change 4d173d5f16c103f640d4089feed44a74b14e9004.

I learned it from ariya‘s commit in phantomjs: 71425850f61ad85e33741ed5a59364327532f6a8.

And today I read an article: Gimmedebugah: how to embedded a Info.plist into arbitrary binaries, which also mentioned this. And it gives me the Apple documentation for that, Code Signing Tasks: Adding an Info.plist to Single-File Tools.

Did you like this? Share it:

Leave a Reply

Your email address will not be published. Required fields are marked *