Objective-C 中导入运行时库
我想知道如何在运行时将库导入到 Objective-C 中。我是 Objective-C 的新手,这可能是一个复杂的问题,但我相当精通 C/C++,
我正在开发一个模块化应用程序,其中根据需要加载特定模块(库)。基本上我在运行时有一个名称,比如“nodeX”,我想加载一个包含它的库。
我一直在寻找一种方法来做到这一点,但没有成功。
谢谢!
I would like to know how I can import a library into Objective-C at runtime. I'm new to Objective-C and this may be a complex question, but I'm fairly proficient in C/C++,
I'm developing a modular application where specific modules (libraries) are loaded as needed. Basically I have a name in runtime, like "nodeX", and I want to load a library that has it.
I've been searching for a way to do this but have been unsuccessful.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅 NSBundle 。
请注意,您无法在 Mac OS X、Objective-C 或其他平台上安全地卸载代码,除非您非常小心,以至于不值得这样做。
另请注意,您无法在 iOS 上动态加载代码。
See NSBundle.
Note that you can't safely unload code on Mac OS X, Objective-C or otherwise, unless you are so terribly careful that it just isn't worth the effort to do so.
Note, also, that you can't dynamically load code on iOS.