I am looking for a way to create frameworks that have substructures that do not interfere with each other at runtime. The illustration below describes the idea better.

Assume that each version of the JSON Parser framework is incompatible with another.
I tried a lot of approaches to achieve the above, but failed every time. The umbrella frames were the most promising, but not only did Apple prevent their use (I donโt understand why), but they didnโt seem to be working properly.
What happens if I create an application with built-in Framework A , which itself has built-in JSON Parser framework v1.0 , everything seems to work fine. But as soon as I add the JSON Parser framework v3.0 to the application and bind the application to it, Framework A starts using the JSON Parser framework v3. 0 at runtime, not v1.0 , which is inside it. And assuming they are incompatible with each other, this could break Framework A.
The same goes for adding Framework B , but which implementation is chosen at runtime seems random.
Is it possible to create Framework A with the built-in JSON Parser framework v1.0 and is it safe to use in such a scenario? Itโs hard for me to believe that this cannot be achieved, but I canโt find a way to make it work, and began to wonder if this is actually possible :(
source share