1

Under ios, no matter what I do, when I call dlopen() it always returns me "image not found". For example, I deploy WebRTC library in the path .\Frameworks\WebRTC.framework and when I call dlopen('./Frameworks/WebRTC.framework/WebRTC') it's failed with image not found

any idea what's wrong? where I must deploy libraries that i can open later via dlopen()?

Note: this is the content of my app :

ALLiveVideoChatClient.app
  /_CodeSignature
  /Frameworks
      /WebRTC.framework
          /WebRTC
  /ALLiveVideoChatClient
zeus
  • 12,173
  • 9
  • 63
  • 184
  • `./Frameworks`? What is that.. If you're trying to reference the frameworks folder, you need to do it via `/Applications/MyApp.app/Frameworks/WebRTC.framework/WebRTC` or the framework could be in the `MyApp.app` folder.. In any case, you shouldn't be loading it with dlopen.. Just link against the framework and it'll work without the need for dlopen.. – Brandon Dec 05 '18 at 12:47
  • @brandom but it's a dynamic library so i must do dlopen on it? – zeus Dec 05 '18 at 12:50
  • It's a framework which you do not need to dlopen. Usually you dlopen on dylib and only on framework in special cases (jailbreaks). Otherwise you should just add the framework to the Linked Libraries in Xcode. It'll automatically link it for you when you first use it. If you don't use it, then it won't link :) – Brandon Dec 05 '18 at 12:56
  • @brandom, but i still not understand, because when i do dlopen('/Applications/ALLiveVideoChatClient.app/Frameworks/WebRTC.framework/WebRTC') then at least it's must NOT return me "image not found". So it's sound like it's can't found the library? I update my question to show you the structure of my app (ALLiveVideoChatClient.app) – zeus Dec 05 '18 at 13:16

0 Answers0