SwiftPM Plugin to post-process compiled app

Greetings,

I am looking to use SPM plugins to post-process an iOS app after it has been built. Is this possible using buildTool type plugins?

Imagine something like my_custom_script.sh fully-built-app.ipa. The important thing is that it applies to the app once it has been built, not to the sources themselves.

I have a working skeleton build tool plugin, however I don't see a way to specify the final app build product as its input. Does anyone have any insights as to how I can do this?

Thanks!

How can something be changed after it has been codesigned - it cannot.

If you dont care about codesigning it might be possible, but your question seem to be about Apple
Ecosystem App binaries, which is out of scope of this forum.

If your question would be about modifying a swiftc compiled binary, that might be another thing - but I cannot image what that would even mean - why would you wanna do that instead if just change the code.

It would be interesting to hear what you wanna achieve which can’t be done during build time.

Good point. Please fogive my clumsy wording; I'd want to examine the swiftc compiled binary.

I am experimenting with various post-build integrations, that might for example examine the symbols in the binary and evaluate if certain restrictions have been met. The SPM plugin architecture seems just about ideal in terms of the ease of integration, except that I cannot seem to hook into the process after compilation of the app itself, but only before.