[quote='888157022, GangOrca, /thread/820251?answerId=888157022#888157022, /profile/GangOrca'] the path to the internal MachO binary is required [/quote] Right. I recommend that you pass an absolute path to dlopen, so you’ll need platform-specific code to generate that path. How you generate that path depends on how you package your code. In both cases you need to get your app’s framework directory. To do that: Get the app’s bundle bundle using Bundle.main. Then get the privateFrameworksURL property from that. From there, you have two choices: If you package the code as a dynamic library (.dylib) you can just append the library file name and away you go. If you package the code as a framework, you have to create a bundle from that framework, using the init(url:) initialiser, and then get the main executable URL from that using the executableURL property. For iOS you have to use the second option; we only support standalone dynamic libraries on macOS. If you can’t us
Topic:
App & System Services
SubTopic:
Core OS
Tags: