I have a static library we use for in-house apps that contains some common utility code. From previous SO posts, I have found that in order to get categories in the static library to be loaded at run-time, I need to include -all_load -ObjC
in the Other Linker Flags field in Build Settings.
However, with a closed-source, 3rd party library that I am also using, if I use these flags, I get several duplicate symbol errors. I have verified that I can get the app to build by taking these flags out, but of course, at runtime I get unrecognized selector crashes when using category methods.
Is there any way to target the -all_load -ObjC
to only be applied to my static library, somehow?
Thanks!
Try using the -force_load flag instead
check this post for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With