@DTS Engineer I see folks avoid load-time imports because of initialisation order issues, and that’s especially true of folks coming from other platforms I'm working on a cross-platform project and there is a dynamic library. In all other OSes, the dynamic library is loaded at runtime and to ensure consistency, wanted to use the same approach for Apple OSes. Further, if the Posix C APIs such as dlopen and dlsym are used, Apple OSes can directly use the same code as Linux, resulting in good simplification. The Framework will be a dependency for the App target (but not linked), signed, embedded in the .app package and all the extension targets (such as Notification Service Extension, Widget extension etc.) will also load it at runtime. But one concern is, to use dlopen and dlsym, the path to the internal MachO binary is required, whereas .so file is used for Linux. Not able to find this documented or attempted, so the question is: Can we use the Posix C APIs such as dlload and dlsym to load MachO binar
Topic:
App & System Services
SubTopic:
Core OS
Tags: