Implement a dynamic library in an enterprise application (ipa)

I want to add my library to an existing enterprise application (ipa file).

I found mach_inject, but this is only for MacOSX.

Perhaps because https://www.mocana.com does this.

Please, help. Any ideas, suggestions would be really helpful.

+7
ios objective-c iphone ipa in-house-distribution
source share
4 answers

It's not clear what you want to do, but mach_inject is a way in which user applications can interact with the MAC OS kernel using Mach ports, it has nothing to do with IPAs, which are essentially archives - like zip or Tar.

I suspect that based on what you are describing, you have a library that you want to edit / include in the user application, but you do not want them to see your source code and vice versa. I am not familiar with Mocana, but based on what you described, it uses IPA for distribution, which is quite possible, but also uses the pre-compiled object module that the Facebook SDK is distributed with.

In any case, before distribution, whether it is an enterprise distribution server or application store, the entire package must be signed before the devices can download and run it.

+3
source share

Yes, you can embed the library in your existing ipa, and then reconcile it with the enterprise certificate. Below is a brief report on how I do this

Browse the executable in MachOView and find the address of the load commands. Then, using the address, change the hexadecimal code and increase the number of load commands by 1 (assuming that I am inserting one library), I also have to increase the offset of the command.

There are tools available for entering the library into hexadecimal code, with which you can now embed the library in a new offset, which you refer to in the load command.

Also see dyci-main in git, which is a dynamic library implementation project.

+2
source share

There is a way to unzip and resign .ipa see answers here How to rewrite ipa file?

This way you can change the contents of .ipa , another part of the problem is to write some kind of wrapper application that loads the source application and inserts the dynamic lib, I'm sure this is not easy to do, but should be possible with that.

+1
source share

.ipa files and executables are signed, and signatures must match. iOS will refuse to launch the application if signatures are incompatible or otherwise invalid. Even if you re-sign ipa with your credentials, the signature will not match the credentials of the executable. In order for the signatures to match, you will need to sign .ipa with your private key or they will have to sign the executable file using your private key. Private keys are not intended to be used in this way ...

0
source share

All Articles