I am working on a static library, called Silicon, that I use for all of my iOS apps.
Because I don't want to create one massive static library that could become hard to maintain I create lots of smaller static libraries that I attach as submodules.
As of the time of this writing the dependency tree for Silicon is as follows:
Silicon
|
|==> FDKeychain
|==> FDDataClient
|
|=> FDRequestClient
|
|=> FDFoundationKit
|==> FDSQLiteDatabase
|
|=> FDFoundationKit
As you can see both FDRequestClient and FDSQLiteDatabase have FDFoundationKit as a common static library.
What seems to happen is that when a project using Silicon is built it builds all of Silicon's target dependencies to the projects build directory. The same thing happens for FDDataClient and FDSQLiteDatabase. So at some point FDFoundationKit from FDRequestClient is built and copied to the build directory as well as FDFoundationKit from FDSQLiteDatabase. Whichever one is built last just overwrites the previous one.
Just by sheer luck FDFoundationKit hasn't been changing in any serious ways such that FDRequestClient and FDSQLiteDatabase can't always be using the same version but I can't guarantee it will be like this forever.
I am trying to figure out if there is a way for Silicon to specify which version of FDFoundationKit to use so it can be Silicon's responsibility to ensure that the the version used will work for both FDRequestClient, FDSQLiteDatabase and any other dependencies I add in the future.
I know CocoaPods attempts to solve this problem but I do not want to make someone have to setup all of that just to get my library working. If I could just find someway of having Silicon define which version of FDFoundationKit to use everything would work perfectly.