Search code examples
iosstatic-librariessipdlopenbaresip

is dlopen use inside a static library in iOS allowed


I am working with a fat static library that uses dlopen() to load interal modules(.so) files inside the static library. On stackoverflow, developers says dlopen() is a private API.

In this case is it fine to use dlopen() or being an private API it shouldn't be used in user libraries irrespective of the library nature i.e static/dynamic.

If I can't use the dlopen() then can someone point to any resource for alternative way to accomplish the same task.

Note: This is regarding baresip BSD library. (http://www.creytiv.com/)

Update: The library is first trying to load all configured modules statically and if it fails then it is trying to load them dynamically using dlopen(). so removing the dynamic loading code will resolve my problem.


Solution

  • dlopen is not allowed on the iOS versions < iOS 8. See e.g. here.