I'm working on a suite of apps supporting macOS, iOS and iPadOS (potentially tvOS, watchOS and visionOS in the future). Each of these App targets contain minimal code to only load the framework dynamically instead of the recommended load-time imports for Apple platforms. The rationales for runtime loading of framework (using dlopen and dlsym) is expressed in earlier post - fyi.
Each app can load multiple frameworks at runtime. Instead of naming the frameworks like this - AppName_purpose1.framework, AppName_purpose2.framework, AppName_purpose3.framework, can it be named as AppName.purpose1, AppName.purpose2, AppName.purpose3 etc?
Basically, change the Framework bundle extension name from .framework to a custom name based on purpose. The folder's extension name is changed, but it's still a framework bundle.
The advantage of this approach is, in my project,
- Frameworks belonging to each of the apps cleanly distinguish themselves with a concise name.
- While this post is about Apple platforms, I'm also checking if other platforms allow to change the names of dynamic libraries (windows allows change). Using my custom extension can standardize the dynamic library's extension name across all platforms.
- Easy framework name construction - The
Frameworkname is now the same as theAppbundle name, which can be queried and this string can be appended with an appropriate extension to load all theFrameworks.
Is it possible to change the extension name of the Framework bundle from the default .framework? If yes, how?