9 ms·
Man, this is gonna reveal some ignorance. But here goes. Please correct me where I'm wrong .so/.dylib/.dll's typically get linked at load time, right? Like we
by bradyriddle 1y ago
Man, this is gonna reveal some ignorance. But here goes. Please correct me where I'm wrong
.so/.dylib/.dll's typically get linked at load time, right? Like we aren't all manually loading dylibs in our source code. I guess I'm surprised on a platform as locked down as ios that they even allow you to link anything at run time.
chatgpt gives me this snippet but I have no way of knowing if this is roughly how it would look.
Class SBApplication = objc_getClass("SBApplication");
SEL launchSel = sel_registerName("launch");
id app = [SBApplication getAppWithBundleID:@"com.example.app"];
objc_msgSend(app, launchSel);
- freeone3000 1y agoYou can put in an autoload section and the runtime linker will load it for you, but you absolutely can load a DLL and its symbol names at runtime. Usually this is done for boring reasons like compatibility with multiple versions of an external library.