I have developed a framework for my customer, thats a swift dyanmic framework. For code modularization i have divided this framework features in to multiple static libraries as shown in the diagram below. Currently we have on main swift dynamnic framework and it contains 2 static libraries too. Also the first static library here in turn nested with another static library, Key points to note here is
- My static libraries contains other third party iOS frameworks
- My static libraries using CoccoaPods as the dependency for Alarmofire at the moment.
My questios are
- Is there any problem in the current architecture , because i heard nested libraries are not supported in iOS . but since we dont have frameworks nested here, all of our second level frameworks are static libraries only.
- What are link/libary search path guidance we needed to take care to make a successful build.
Is there any problem in the current architecture
No.
because i heard nested libraries are not supported in iOS.
You’re correct that iOS doesn’t support nested frameworks.
but since we dont have frameworks nested here, all of our second level frameworks are static libraries only.
And also correct that this isn’t an issue for you because everything within your framework is a static library. At build time these are all statically linked together to form the framework’s dynamic library, so there’s no nesting in the final product.
What are link/libary search path guidance we needed to take care to make a successful build.
It’s impossible to answer that without knowing more about your build system. In general Xcode should take care of this stuff for you. My general advice on that front is:
-
If you’re building this stuff from source code, Xcode should just work.
-
If you’re building parts of it separately, which means you end up with a binary build product that’s consumed by Xcode, I recommend that you use an XCFramework for that build product. That allows you to collect all the resources you need into one item, at which point Xcode should do the right thing.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"