I found some very useful environment variables you can set on the application you are debugging when you need to see what symbols are being recorded by dlopen when it opens all of the libraries in your application: click on me, click on me please!
So, from your Xcode project, double click your debug app:
Now, set the following variables to YES, or NO, depending on what info you need:
You are going to get a ton of information in the debugger console, which is very useful when trying to figure out if there are any offending symbols that could be tripping up your project.
Here is a rundown of the variables:
- DYLD_PRINT_LIBRARIES – Logs when images are loaded.
- DYLD_PRINT_LIBRARIES_POST_LAUNCH – Logs when images are loaded as a result of a dlopen call. Includes a dynamic libraries’ dependent libraries.
- DYLD_PRINT_APIS – Logs the invocation that causes the dynamic loader to return the address of a symbol.
- DYLD_PRINT_STATISTICS – Logs statistical information on an application’s launch process, such as how many images were loaded, when the application finishes launching.
- DYLD_PRINT_INITIALIZERS – Logs when the dynamic loader calls initializer and finalizer functions.
- DYLD_PRINT_SEGMENTS – Logs when the dynamic loader maps a segment of a dynamic library to the current process’s address space.
- DYLD_PRINT_BINDINGS – Logs when the dynamic loader binds an undefined external symbol with its definition.